Skip to content

Commit

Permalink
fix bug in code
Browse files Browse the repository at this point in the history
  • Loading branch information
marusoft committed Jul 16, 2019
1 parent 6be1d70 commit f97517c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/controllers/carControllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class Cars {
static async updateCarStatus(req, res) {

const { findSpecificCar } = req.body;
console.log('>>>', findSpecificCar);

const markCarAsSoldSql = 'UPDATE cars SET status = $1 WHERE id = $2 AND owner = $3 RETURNING *';
if (findSpecificCar.status === 'available') {
Expand Down
1 change: 1 addition & 0 deletions server/routes/carRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ carRouter.delete('/car/:id',
carRouter.patch(
'/car/:id/status',
UserAuthentication.verifyUser,
CarsValidation.validateSpecifyCar,
/* UserAuthentication.isOwner, */
Cars.updateCarStatus,
);
Expand Down

0 comments on commit f97517c

Please sign in to comment.