fix broken build,
This commit is contained in:
@@ -28,7 +28,7 @@ export async function POST(req: NextRequest) {
|
||||
|
||||
try {
|
||||
const order = await createOrder(data);
|
||||
return response(order, STATUS.CREATED);
|
||||
return response(order, STATUS.OK);
|
||||
} catch (error) {
|
||||
return handleError('Order - Create', error);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export async function PUT(req: NextRequest) {
|
||||
if (!orderId) throw new Error('orderId cannot be null');
|
||||
const id: number = parseInt(orderId);
|
||||
|
||||
const updatedOrder = await updateOrder(id, data);
|
||||
const updatedOrder = await updateOrder(id.toString(), data);
|
||||
return response(updatedOrder, STATUS.OK);
|
||||
} catch (error) {
|
||||
return handleError('Order - Update', error);
|
||||
@@ -68,7 +68,7 @@ export async function DELETE(req: NextRequest) {
|
||||
if (!orderId) throw new Error('orderId cannot be null');
|
||||
const id: number = parseInt(orderId);
|
||||
|
||||
await deleteOrder(id);
|
||||
await deleteOrder(id.toString());
|
||||
return response({ success: true }, STATUS.OK);
|
||||
} catch (error) {
|
||||
return handleError('Order - Delete', error);
|
||||
|
Reference in New Issue
Block a user