Skip to content

Commit

Permalink
fix(zabo): fix router rules
Browse files Browse the repository at this point in the history
  • Loading branch information
withSang committed Sep 17, 2023
1 parent bd895e3 commit 94bb7d1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/routes/zabo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ const isZaboOwner = [
isZaboOwnerMiddleware,
];

router.post(
"/",
authMiddleware,
findSelfMiddleware,
zaboUpload.array("img", 20),
zc.postNewZabo,
);
router.get("/:zaboId", validateZaboId, tryFindSelf, zc.getZabo);
router.get(
"/list",
tryFindSelf,
Expand All @@ -51,10 +43,18 @@ router.get(
);
router.get("/list/hot", zc.listHotZabos);
router.get("/list/deadline", zc.listMagamImbakList);
router.patch("/:zaboId", isZaboOwner, zc.editZabo);
router.post("/:zaboId/pin", findZaboWithAuth, zc.pinZabo);
router.post("/:zaboId/like", findZaboWithAuth, zc.likeZabo);
router.post("/:zaboId/share", findZaboWithAuth, zc.shareZabo);
router.get("/:zaboId", validateZaboId, tryFindSelf, zc.getZabo);
router.patch("/:zaboId", isZaboOwner, zc.editZabo);
router.delete("/:zaboId", isZaboOwner, zc.deleteZabo);
router.post(
"/",
authMiddleware,
findSelfMiddleware,
zaboUpload.array("img", 20),
zc.postNewZabo,
);

module.exports = router;

0 comments on commit 94bb7d1

Please sign in to comment.