diff --git a/src/routes/docs/users.js b/src/routes/docs/users.js index e477bf5b..0e6f1b41 100644 --- a/src/routes/docs/users.js +++ b/src/routes/docs/users.js @@ -398,11 +398,29 @@ usersDocs[`${apiPrefix}/withdraw`] = { tags: [tag], summary: "회원 탈퇴", description: "회원 탈퇴를 요청합니다.", + parameters: [ + { + in: "query", + name: "redirect", + schema: { + type: "string", + }, + description: "로그아웃 후 리다이렉트 URI", + }, + ], responses: { 200: { content: { - "text/html": { - example: "Users/withdraw : withdraw successful", + "application/json": { + schema: { + type: "object", + properties: { + ssoLogoutUrl: { + type: "string", + description: "SSO 로그아웃 URL", + }, + }, + }, }, }, }, diff --git a/src/routes/users.ts b/src/routes/users.ts index c5afa7a8..2f431d64 100755 --- a/src/routes/users.ts +++ b/src/routes/users.ts @@ -1,5 +1,5 @@ import express from "express"; -import { body } from "express-validator"; +import { body, query } from "express-validator"; import { authMiddleware, validatorMiddleware } from "@/middlewares"; import patterns from "@/modules/patterns"; @@ -60,6 +60,11 @@ router.get("/resetProfileImg", userHandlers.resetProfileImgHandler); router.get("/getBanRecord", userHandlers.getBanRecordHandler); // 회원 탈퇴를 요청합니다. -router.post("/withdraw", userHandlers.withdrawHandler); +router.post( + "/withdraw", + query("redirect").optional().isString(), + validatorMiddleware, + userHandlers.withdrawHandler +); export default router;