Skip to content

Commit f568885

Browse files
author
Víctor Martínez
committed
hotfix: bookings routes
1 parent 330d235 commit f568885

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/routes/bookings-routes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const {
1414
setStatus
1515
} = require("../controllers/bookings-controller");
1616

17-
bookingsRouter.post("/", auth(), validateNewBooking, bookProperty);
18-
bookingsRouter.delete("/:propertyId", auth(), cancelBooking);
19-
bookingsRouter.get("/all", auth(), getBookings);
20-
2117
bookingsRouter.get("/employees/:eid", validateJWT, getBookingsByEmployeeId);
18+
bookingsRouter.patch("/:propertyId/address", validateJWT, validateUpdateBookingAddress, updateBookingAddress);
2219
bookingsRouter.post("/:propertyId", validateJWT, validateSetStatus, setStatus);
23-
bookingsRouter.patch("/:propertyId", validateJWT, validateUpdateBookingAddress, updateBookingAddress);
20+
21+
bookingsRouter.delete("/:propertyId", auth(), cancelBooking);
22+
bookingsRouter.get("/all", auth(), getBookings);
23+
bookingsRouter.post("/", auth(), validateNewBooking, bookProperty);
2424

2525
module.exports = bookingsRouter;

0 commit comments

Comments
 (0)