From 61a19ae4cd7fe797ef65e53488dcf4aef542fa1a Mon Sep 17 00:00:00 2001 From: Jieun Kim Date: Tue, 20 Feb 2024 18:43:55 +0900 Subject: [PATCH] =?UTF-8?q?feat(#88):=20User=20API=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/authController.js | 20 -------------------- src/router/authRouter.js | 4 +--- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/controller/authController.js b/src/controller/authController.js index aa66329..9dfcf79 100644 --- a/src/controller/authController.js +++ b/src/controller/authController.js @@ -448,26 +448,6 @@ export const subscribePremium = async (req, res, next) => { } }; -/* - * API No. 11 - * API Name : 개인 포인트 순위 조회 - * [GET] /auth/rank - */ -export const getUserRank = async(req, res, next) => { - try { - const users = await User.find().sort({ point: -1 }).limit(3); - - if (users.length === 0) { - return res.send(errResponse(status.MEMBER_NOT_FOUND)); - } - - return res.send(response(status.SUCCESS, users)); - } catch (err) { - console.log(err); - return res.send(errResponse(status.INTERNAL_SERVER_ERROR)); - } -}; - /*************************************************************************************/ // 이메일 유효성 검사 export const validEmailCheck = (email) => { diff --git a/src/router/authRouter.js b/src/router/authRouter.js index b11a600..67fd9af 100644 --- a/src/router/authRouter.js +++ b/src/router/authRouter.js @@ -10,7 +10,6 @@ import { checkEmail, findPassword, subscribePremium, - getUserRank, } from "../controller/authController"; import { authenticateUser, @@ -37,5 +36,4 @@ authRouter.patch("/find-password", findPassword); // 비밀번호 찾기 authRouter.post("/premium", authenticateUser, subscribePremium); // 프리미엄 구독 authRouter.get("/payment", function (req, res) { res.render("payment"); -}); -authRouter.get("/rank", getUserRank); // 개인 포인트 순위 조회 \ No newline at end of file +}); \ No newline at end of file