From 94bb7d1aa47ed3c0332c21d2679ff96fb040f18d Mon Sep 17 00:00:00 2001 From: withsang Date: Sun, 17 Sep 2023 11:23:08 +0900 Subject: [PATCH] fix(zabo): fix router rules --- src/routes/zabo.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/routes/zabo.js b/src/routes/zabo.js index 04083f6..9cc02ef 100644 --- a/src/routes/zabo.js +++ b/src/routes/zabo.js @@ -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, @@ -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;