Feat/decline order edit (#2234)
**What** - Decline an order edit from a store endpoint - Refactor totals setting to a service method Fixes CORE-502
This commit is contained in:
@@ -69,6 +69,15 @@ export const storeHandlers = [
|
||||
)
|
||||
}),
|
||||
|
||||
rest.post("/store/order-edits/:id/decline", (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.status(200),
|
||||
ctx.json({
|
||||
order_edit: {...fixtures.get("order_edit"), declined_reason: req.body.declined_reason, status: 'declined'},
|
||||
})
|
||||
)
|
||||
}),
|
||||
|
||||
rest.get("/store/orders/:id", (req, res, ctx) => {
|
||||
return res(
|
||||
ctx.status(200),
|
||||
|
||||
Reference in New Issue
Block a user