Skip to content

Commit

Permalink
fix preventing delivering your own order
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhappyma committed Jan 7, 2025
1 parent 2f7245e commit 6593d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/orders/updateStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const updateOrderStatus = async (
);
if (order.status != orderStatus.PACKED)
throw new Error("Order status is not PACKED");
if (order.customerUsername == chef)
if (order.customerId == chef)
throw new Error(
"you ordered this! who are you gonna deliver to, yourself?"
);
Expand Down

0 comments on commit 6593d73

Please sign in to comment.