From 8cf0ff99f8440c5bff2fadca5cdf30429bc7d39a Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 10 Jan 2024 16:42:10 +0900 Subject: [PATCH] =?UTF-8?q?#52=20[feat]=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=EC=8B=9C=20=ED=9D=AC=EB=A7=9D=20=EC=A7=80=EC=97=AD=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=20Controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/controller/auth/AuthController.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/com/moddy/server/controller/auth/AuthController.java b/src/main/java/com/moddy/server/controller/auth/AuthController.java index 3fff103d..f335c614 100644 --- a/src/main/java/com/moddy/server/controller/auth/AuthController.java +++ b/src/main/java/com/moddy/server/controller/auth/AuthController.java @@ -1,9 +1,12 @@ package com.moddy.server.controller.auth; import com.moddy.server.common.dto.ErrorResponse; +import com.moddy.server.common.dto.SuccessNonDataResponse; import com.moddy.server.common.dto.SuccessResponse; +import com.moddy.server.common.exception.enums.SuccessCode; import com.moddy.server.config.resolver.kakao.KakaoCode; import com.moddy.server.controller.auth.dto.response.LoginResponseDto; +import com.moddy.server.controller.auth.dto.response.RegionResponse; import com.moddy.server.service.auth.AuthService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -15,10 +18,13 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + import static com.moddy.server.common.exception.enums.SuccessCode.SOCIAL_LOGIN_SUCCESS; @Tag(name = "Auth Controller", description = "로그인 및 회원 가입 관련 API 입니다.") @@ -44,4 +50,16 @@ public SuccessResponse login( ) { return SuccessResponse.success(SOCIAL_LOGIN_SUCCESS, authService.login(request.getHeader(ORIGIN), kakaoCode)); } + + @Operation(summary = "모델 회원가입 시 희망 지역 리스트 조회 API") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "희망 지역 리스트 조회 성공입니다."), + @ApiResponse(responseCode = "500", description = "서버 내부 오류", content = @Content(schema = @Schema(implementation = ErrorResponse.class))) + }) + @GetMapping("/regions") + public SuccessResponse> getRegionList() { + return SuccessResponse.success(SuccessCode.FIND_REGION_LIST_SUCCESS, authService.getRegionList()); + } + + }