feat(core-flows,dashboard,types,medusa): delete shipping methods when all inbound/outbound items are deleted (#9106)
* feat(core-flows,dashboard,types,medusa): delete shipping methods when all inbound/outbound items are deleted * chore: fix specs
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
removeAddItemClaimActionWorkflow,
|
||||
updateClaimAddItemWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
@@ -11,7 +12,6 @@ import {
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
import { AdminPostClaimsItemsActionReqSchemaType } from "../../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsItemsActionReqSchemaType>,
|
||||
@@ -55,7 +55,6 @@ export const DELETE = async (
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
const { id, action_id } = req.params
|
||||
|
||||
const { result: orderPreview } = await removeAddItemClaimActionWorkflow(
|
||||
req.scope
|
||||
).run({
|
||||
|
||||
@@ -86,12 +86,10 @@ export const DELETE = async (
|
||||
entryPoint: "return",
|
||||
variables: {
|
||||
id: exchange.return_id,
|
||||
filters: {
|
||||
...req.filterableFields,
|
||||
},
|
||||
},
|
||||
fields: req.remoteQueryConfig.fields,
|
||||
fields: defaultAdminDetailsReturnFields,
|
||||
})
|
||||
|
||||
const [orderReturn] = await remoteQuery(queryObject)
|
||||
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user