Skip to content

Commit

Permalink
refactor: Update user-order.controller.ts
Browse files Browse the repository at this point in the history
Signed-off-by: austin047 <[email protected]>
  • Loading branch information
austin047 authored and jannyHou committed Apr 29, 2019
1 parent 0d663c8 commit 6903c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shopping/src/controllers/user-order.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class UserOrderController {
@inject('authentication.currentUser') currentUser: UserProfile,
@requestBody() order: Order,
): Promise<Order> {
if (currentUser.id !== userId) {
if (currentUser.id !== order.userId) {
throw new HttpErrors.BadRequest(
`User id does not match looged in user: ${userId} !== ${
currentUser.id
Expand Down

0 comments on commit 6903c1c

Please sign in to comment.