party-order delete ok,
This commit is contained in:
@@ -9,13 +9,13 @@ import { deleteOrder } from 'src/app/services/party-order.service';
|
|||||||
*************************************** */
|
*************************************** */
|
||||||
export async function PATCH(req: NextRequest) {
|
export async function PATCH(req: NextRequest) {
|
||||||
try {
|
try {
|
||||||
const { orderId } = await req.json();
|
const { partyOrderId } = await req.json();
|
||||||
|
|
||||||
if (!orderId) throw new Error('orderId cannot be null');
|
if (!partyOrderId) throw new Error('orderId cannot be null');
|
||||||
|
|
||||||
await deleteOrder(orderId);
|
await deleteOrder(partyOrderId);
|
||||||
|
|
||||||
return response({ orderId }, STATUS.OK);
|
return response({ partyOrderId }, STATUS.OK);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return handleError('PartyOrder - Delete', error);
|
return handleError('PartyOrder - Delete', error);
|
||||||
}
|
}
|
||||||
|
@@ -4,5 +4,5 @@ PATCH http://localhost:7272/api/party-order/delete
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"orderId": "e99f09a7-dd88-49d5-b1c8-1daf80c2d7b02"
|
"partyOrderId": "e99f09a7-dd88-49d5-b1c8-1daf80c2d7b02"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user