|
1 | 1 | package com.somemore.user.controller; |
2 | 2 |
|
| 3 | +import com.somemore.global.auth.annotation.UserId; |
3 | 4 | import com.somemore.global.common.response.ApiResponse; |
4 | 5 | import com.somemore.user.usecase.UserQueryUseCase; |
| 6 | +import com.somemore.user.usecase.ValidateBasicInfoUseCase; |
5 | 7 | import io.swagger.v3.oas.annotations.Operation; |
6 | 8 | import io.swagger.v3.oas.annotations.tags.Tag; |
7 | 9 | import lombok.RequiredArgsConstructor; |
|
11 | 13 | import org.springframework.web.bind.annotation.RequestParam; |
12 | 14 | import org.springframework.web.bind.annotation.RestController; |
13 | 15 |
|
| 16 | +import java.util.UUID; |
| 17 | + |
14 | 18 | @Tag(name = "User Query API", description = "유저 조회 관련 API") |
15 | 19 | @RestController |
16 | 20 | @Slf4j |
|
19 | 23 | public class UserQueryController { |
20 | 24 |
|
21 | 25 | private final UserQueryUseCase userQueryUseCase; |
| 26 | + private final ValidateBasicInfoUseCase validateBasicInfoUseCase; |
22 | 27 |
|
23 | | - @GetMapping("/exists/") |
| 28 | + @GetMapping("/exists") |
24 | 29 | @Operation(summary = "아이디 중복 확인", description = "입력한 아이디가 중복되었는지 확인합니다.") |
25 | 30 | public ApiResponse<Boolean> checkUserExists( |
26 | 31 | @RequestParam String accountId |
27 | 32 | ) { |
28 | 33 | boolean isAccountIdDuplicate = userQueryUseCase.isDuplicateAccountId(accountId); |
29 | 34 | return ApiResponse.ok(isAccountIdDuplicate, "중복 조회 완료"); |
30 | 35 | } |
| 36 | + |
| 37 | + @GetMapping("/check/basic-info") |
| 38 | + @Operation(summary = "유저 기본 정보 입력 상태 확인", description = "현재 유저의 필수 입력 정보가 모두 완료되었는지 확인합니다." |
| 39 | + ) |
| 40 | + public ApiResponse<Boolean> checkUserExists( |
| 41 | + @UserId UUID userId |
| 42 | + ) { |
| 43 | + boolean isBasicInfoComplete = validateBasicInfoUseCase.isBasicInfoComplete(userId); |
| 44 | + return ApiResponse.ok(isBasicInfoComplete, "필수 입력 정보 설정 조회 완료"); |
| 45 | + } |
31 | 46 | } |
0 commit comments