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:
Philip Korsholm
2022-09-30 09:48:18 +02:00
committed by GitHub
parent 95c0dc653a
commit 00959f79bc
15 changed files with 811 additions and 11 deletions
@@ -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(