chore: cleanup inspection (#6358)

This commit is contained in:
Adrien de Peretti
2024-02-09 14:40:09 +01:00
committed by GitHub
parent 94062d28be
commit b91a1ca5b8
19 changed files with 66 additions and 72 deletions
@@ -751,7 +751,7 @@ export default class PromotionModuleService<
sharedContext
)
return this.retrieve(
return await this.retrieve(
promotionId,
{ relations: ["rules", "rules.values"] },
sharedContext
@@ -784,7 +784,7 @@ export default class PromotionModuleService<
sharedContext
)
return this.retrieve(
return await this.retrieve(
promotionId,
{
relations: [
@@ -825,7 +825,7 @@ export default class PromotionModuleService<
sharedContext
)
return this.retrieve(
return await this.retrieve(
promotionId,
{
relations: [
@@ -882,7 +882,7 @@ export default class PromotionModuleService<
): Promise<PromotionTypes.PromotionDTO> {
await this.removePromotionRules_(promotionId, rulesData, sharedContext)
return this.retrieve(
return await this.retrieve(
promotionId,
{ relations: ["rules", "rules.values"] },
sharedContext
@@ -926,7 +926,7 @@ export default class PromotionModuleService<
sharedContext
)
return this.retrieve(
return await this.retrieve(
promotionId,
{
relations: [
@@ -954,7 +954,7 @@ export default class PromotionModuleService<
sharedContext
)
return this.retrieve(
return await this.retrieve(
promotionId,
{
relations: [
@@ -5,7 +5,7 @@ import {
MedusaError,
PromotionType,
} from "@medusajs/utils"
import { areRulesValidForContext } from "../validations/promotion-rule"
import { areRulesValidForContext } from "../validations"
import { computeActionForBudgetExceeded } from "./usage"
export function getComputedActionsForBuyGet(
@@ -2,16 +2,13 @@ import {
ApplicationMethodAllocation,
ApplicationMethodTargetType,
ApplicationMethodType,
MedusaError,
PromotionType,
isDefined,
isPresent,
MedusaError,
PromotionType,
} from "@medusajs/utils"
import { Promotion } from "@models"
import {
CreateApplicationMethodDTO,
UpdateApplicationMethodDTO,
} from "../../types"
import { CreateApplicationMethodDTO, UpdateApplicationMethodDTO } from "@types"
export const allowedAllocationTargetTypes: string[] = [
ApplicationMethodTargetType.SHIPPING_METHODS,
@@ -1,12 +1,12 @@
import { PromotionRuleDTO, PromotionRuleOperatorValues } from "@medusajs/types"
import {
MedusaError,
PromotionRuleOperator,
isPresent,
isString,
MedusaError,
pickValueFromObject,
PromotionRuleOperator,
} from "@medusajs/utils"
import { CreatePromotionRuleDTO } from "../../types"
import { CreatePromotionRuleDTO } from "@types"
export function validatePromotionRuleAttributes(
promotionRulesData: CreatePromotionRuleDTO[]