Skip to content

Commit

Permalink
refactor: return an error when current user id does not match user id…
Browse files Browse the repository at this point in the history
… for the order

Signed-off-by: austin047 <fuhaustin@gmail.com>
  • Loading branch information
austin047 committed Apr 10, 2019
2 parents 765ddb8 + 91805dd commit 7da2091
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/user-order.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class UserOrderController {
): Promise<Order> {
if (currentUser.id !== order.userId) {
throw new HttpErrors.BadRequest(
`User id does not match looged in user: ${userId} !== ${
currentUser.id
`User id does not match looged in user: ${currentUser.id} !== ${
order.userId
}`,
);
}
Expand Down

0 comments on commit 7da2091

Please sign in to comment.