Feat(medusa): remove item from order (#2273)
* wait for update to order edit model * delete line item tests * create remove method for lineitem with tax lines * add remove item tests * split delete allocation tests into two: more and less than total * remove unused import * cleanup * add medusa-js and react endpoints * pr feedback fixes * linting * remove unused relation from query * remove removed-event and unused imports * add await
This commit is contained in:
@@ -1783,6 +1783,22 @@ export const adminHandlers = [
|
||||
})
|
||||
)
|
||||
}),
|
||||
|
||||
rest.delete("/admin/order-edits/:id/items/:item_id", (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.status(200),
|
||||
ctx.json({
|
||||
order_edit: {
|
||||
...fixtures.get("order_edit"),
|
||||
changes: [
|
||||
{
|
||||
type: 'item_remove'
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
)
|
||||
}),
|
||||
|
||||
rest.get("/admin/auth", (req, res, ctx) => {
|
||||
return res(
|
||||
|
||||
Reference in New Issue
Block a user