diff --git a/.changeset/five-candles-dress.md b/.changeset/five-candles-dress.md new file mode 100644 index 0000000000000..b35220b75f5e2 --- /dev/null +++ b/.changeset/five-candles-dress.md @@ -0,0 +1,6 @@ +--- +"@medusajs/core-flows": patch +"@medusajs/medusa": patch +--- + +fix(core-flows,medusa): use deleteRefundReasonsWorkflow in delete /admin/refund-reasons/:id diff --git a/packages/core/core-flows/src/payment-collection/workflows/index.ts b/packages/core/core-flows/src/payment-collection/workflows/index.ts index 1baf16420a824..f8bbbf5d0d308 100644 --- a/packages/core/core-flows/src/payment-collection/workflows/index.ts +++ b/packages/core/core-flows/src/payment-collection/workflows/index.ts @@ -2,3 +2,4 @@ export * from "./create-payment-session" export * from "./create-refund-reasons" export * from "./delete-payment-sessions" export * from "./update-refund-reasons" +export * from "./delete-refund-reasons" \ No newline at end of file diff --git a/packages/medusa/src/api/admin/refund-reasons/[id]/route.ts b/packages/medusa/src/api/admin/refund-reasons/[id]/route.ts index c2fd17b544035..4f3270099251d 100644 --- a/packages/medusa/src/api/admin/refund-reasons/[id]/route.ts +++ b/packages/medusa/src/api/admin/refund-reasons/[id]/route.ts @@ -1,5 +1,5 @@ import { - deleteReturnReasonsWorkflow, + deleteRefundReasonsWorkflow, updateRefundReasonsWorkflow, } from "@medusajs/core-flows" import { HttpTypes, RefundReasonResponse } from "@medusajs/framework/types" @@ -56,7 +56,7 @@ export const DELETE = async ( const { id } = req.params const input = { ids: [id] } - await deleteReturnReasonsWorkflow(req.scope).run({ input }) + await deleteRefundReasonsWorkflow(req.scope).run({ input }) res.json({ id,