diff --git a/src/controller/CheckoutController.ts b/src/controller/CheckoutController.ts index aac05c4..2e1247f 100644 --- a/src/controller/CheckoutController.ts +++ b/src/controller/CheckoutController.ts @@ -43,8 +43,8 @@ export class CheckoutController { } async createCheckout(request: Request, response: Response): Promise { - const { waContact, lineContact, address, items: orderItems } = request.body; const id = response.locals.auth.id; + const { waContact = id, lineContact, address, items: orderItems } = request.body; if (orderItems.length === 0) { return responseGenerator(response, 400, "no-item-selected");