diff --git a/adapters/in-web/src/main/kotlin/com/pokit/auth/config/SecurityConfig.kt b/adapters/in-web/src/main/kotlin/com/pokit/auth/config/SecurityConfig.kt index 007fa323..84736ebc 100644 --- a/adapters/in-web/src/main/kotlin/com/pokit/auth/config/SecurityConfig.kt +++ b/adapters/in-web/src/main/kotlin/com/pokit/auth/config/SecurityConfig.kt @@ -19,13 +19,14 @@ class SecurityConfig( companion object { private val WHITE_LIST = arrayOf( "/api/v1/auth/signin", + "/api/v1/user/interests", "/swagger-ui/index.html#/", "/swagger", "/swagger-ui.html", "/swagger-ui/**", "/api-docs", "/api-docs/**", - "/v3/api-docs/**" + "/v3/api-docs/**", ) } diff --git a/adapters/in-web/src/main/kotlin/com/pokit/auth/filter/CustomAuthenticationFilter.kt b/adapters/in-web/src/main/kotlin/com/pokit/auth/filter/CustomAuthenticationFilter.kt index 7b020e69..6c4e66b1 100644 --- a/adapters/in-web/src/main/kotlin/com/pokit/auth/filter/CustomAuthenticationFilter.kt +++ b/adapters/in-web/src/main/kotlin/com/pokit/auth/filter/CustomAuthenticationFilter.kt @@ -28,6 +28,7 @@ class CustomAuthenticationFilter( override fun shouldNotFilter(request: HttpServletRequest): Boolean { val excludePath = arrayOf( "/api/v1/auth/signin", + "/api/v1/user/interests", "/swagger-ui/index.html#/", "/swagger", "/swagger-ui.html", "/swagger-ui/**", diff --git a/adapters/in-web/src/main/kotlin/com/pokit/user/UserController.kt b/adapters/in-web/src/main/kotlin/com/pokit/user/UserController.kt index 974aea16..266771cc 100644 --- a/adapters/in-web/src/main/kotlin/com/pokit/user/UserController.kt +++ b/adapters/in-web/src/main/kotlin/com/pokit/user/UserController.kt @@ -8,9 +8,11 @@ import com.pokit.user.dto.request.ApiSignUpRequest import com.pokit.user.dto.request.ApiUpdateNicknameRequest import com.pokit.user.dto.request.toDto import com.pokit.user.dto.response.CheckDuplicateNicknameResponse +import com.pokit.user.dto.response.InterestTypeResponse import com.pokit.user.dto.response.UserResponse import com.pokit.user.dto.response.toResponse import com.pokit.user.exception.UserErrorCode +import com.pokit.user.model.InterestType import com.pokit.user.port.`in`.UserUseCase import io.swagger.v3.oas.annotations.Operation import jakarta.validation.Valid @@ -59,4 +61,11 @@ class UserController( .toResponse() .wrapOk() } + + @GetMapping("/interests") + @Operation(summary = "관심사 목록 조회 API") + fun getInterests(): ResponseEntity> = + InterestType.values() + .map { InterestTypeResponse(it.name, it.kor) } + .wrapOk() } diff --git a/adapters/in-web/src/main/kotlin/com/pokit/user/dto/response/InterestTypeResponse.kt b/adapters/in-web/src/main/kotlin/com/pokit/user/dto/response/InterestTypeResponse.kt new file mode 100644 index 00000000..7a3473ea --- /dev/null +++ b/adapters/in-web/src/main/kotlin/com/pokit/user/dto/response/InterestTypeResponse.kt @@ -0,0 +1,6 @@ +package com.pokit.user.dto.response + +data class InterestTypeResponse( + val code: String, + val description: String +) diff --git a/domain/src/main/kotlin/com/pokit/user/model/InterestType.kt b/domain/src/main/kotlin/com/pokit/user/model/InterestType.kt index dc83ffdc..f6eb2775 100644 --- a/domain/src/main/kotlin/com/pokit/user/model/InterestType.kt +++ b/domain/src/main/kotlin/com/pokit/user/model/InterestType.kt @@ -10,16 +10,17 @@ enum class InterestType( OFFICE("문구/오피스"), FASHION("패션"), TRAVEL("여행"), - ECONOMIY("경제/시사"), + ECONOMY("경제/시사"), MOVIE_DRAMA("영화/드라마"), RESTAURANT("맛집"), INTERIOR("인테리어"), IT("IT"), DESIGN("디자인"), - SELF_DEVELOPMENT("자기계발"), + SELF_IMPROVEMENT("자기계발"), HUMOR("유머"), MUSIC("음악"), - EMPLOYMENT_INFORMATION("취업정보"); + JOB_INFO("취업정보") + ; companion object { fun of(input: String): InterestType {