fix: make v2 with modules run (#6636)
This commit is contained in:
@@ -61,12 +61,10 @@ export const DELETE = async (
|
||||
res: MedusaResponse
|
||||
) => {
|
||||
const id = req.params.id
|
||||
const manager = req.scope.resolve("manager")
|
||||
const deleteCampaigns = deleteCampaignsWorkflow(req.scope)
|
||||
|
||||
const { errors } = await deleteCampaigns.run({
|
||||
input: { ids: [id] },
|
||||
context: { manager },
|
||||
throwOnError: false,
|
||||
})
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
import { AdminPostPromotionsPromotionReq } from "../validators"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { UpdateApplicationMethodDTO } from "@medusajs/types"
|
||||
import { UpdatePromotionDTO } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
@@ -58,12 +57,10 @@ export const DELETE = async (
|
||||
res: MedusaResponse
|
||||
) => {
|
||||
const id = req.params.id
|
||||
const manager = req.scope.resolve("manager")
|
||||
const deletePromotions = deletePromotionsWorkflow(req.scope)
|
||||
|
||||
const { errors } = await deletePromotions.run({
|
||||
input: { ids: [id] },
|
||||
context: { manager },
|
||||
throwOnError: false,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user