Skip to content

Commit

Permalink
fix(medusa): remove request body type argument from cancel order tran…
Browse files Browse the repository at this point in the history
…sfer routes (#10327)

Remove the request body type passed as a type argument for admin and store routes for order transfer cancelation. Since the type is empty, it leads to a generated empty request body schema in the API reference.
  • Loading branch information
shahednasser authored Nov 27, 2024
1 parent 70e179a commit ef04684
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-tigers-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

fix(medusa): remove request body type argument from cancel order transfer routes
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import {
MedusaResponse,
} from "@medusajs/framework/http"
import { AdminOrder, HttpTypes } from "@medusajs/framework/types"
import { AdminCancelOrderTransferRequestType } from "../../../validators"
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"

export const POST = async (
req: AuthenticatedMedusaRequest<AdminCancelOrderTransferRequestType>,
req: AuthenticatedMedusaRequest,
res: MedusaResponse<HttpTypes.AdminOrderResponse>
) => {
const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {
MedusaResponse,
} from "@medusajs/framework/http"
import { HttpTypes } from "@medusajs/framework/types"
import { StoreCancelOrderTransferRequestType } from "../../../validators"

export const POST = async (
req: AuthenticatedMedusaRequest<StoreCancelOrderTransferRequestType>,
req: AuthenticatedMedusaRequest,
res: MedusaResponse<HttpTypes.StoreOrderResponse>
) => {
const orderId = req.params.id
Expand Down

0 comments on commit ef04684

Please sign in to comment.