chore(medusa): remove unfinished update order endpoint (#10169)

This commit is contained in:
Riqwan Thamir
2024-11-20 09:44:49 +01:00
committed by GitHub
parent 8091c5f5bc
commit 3c4a9b85d8

View File

@@ -4,10 +4,6 @@ import {
MedusaResponse,
} from "@medusajs/framework/http"
import { HttpTypes } from "@medusajs/framework/types"
import {
ContainerRegistrationKeys,
remoteQueryObjectFromString,
} from "@medusajs/framework/utils"
import { AdminGetOrdersOrderParamsType } from "../validators"
export const GET = async (
@@ -25,23 +21,3 @@ export const GET = async (
res.status(200).json({ order: result as HttpTypes.AdminOrder })
}
export const POST = async (
req: AuthenticatedMedusaRequest,
res: MedusaResponse<HttpTypes.AdminOrderResponse>
) => {
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
const variables = { id: req.params.id }
// TODO: update order
const queryObject = remoteQueryObjectFromString({
entryPoint: "order",
variables,
fields: req.remoteQueryConfig.fields,
})
const [order] = await remoteQuery(queryObject)
res.status(200).json({ order })
}