Skip to content

Commit

Permalink
fix(core-flows,medusa): use deleteRefundReasonsWorkflow in delete /ad…
Browse files Browse the repository at this point in the history
…min/refund-reasons/:id (#11012)
  • Loading branch information
shahednasser authored Jan 17, 2025
1 parent c09d7e5 commit 7be4735
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/five-candles-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/core-flows": patch
"@medusajs/medusa": patch
---

fix(core-flows,medusa): use deleteRefundReasonsWorkflow in delete /admin/refund-reasons/:id
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions packages/medusa/src/api/admin/refund-reasons/[id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
deleteReturnReasonsWorkflow,
deleteRefundReasonsWorkflow,
updateRefundReasonsWorkflow,
} from "@medusajs/core-flows"
import { HttpTypes, RefundReasonResponse } from "@medusajs/framework/types"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7be4735

Please sign in to comment.