Skip to content

Commit f0e1cb4

Browse files
committed
refactor: 에러코드 변경, email 제약조건 설정
1 parent a3acc16 commit f0e1cb4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/com/devpath/domain/user/contorller/UserControllerDocs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ApiResponse<CursorResponseDto<CardPrevRes>> getCards(Long userId, Long cursor, I
3636
@Operation(summary = "명함 교환", description = "명함 코드를 입력하면 명함이 교환됩니다.")
3737
@ApiResponses({
3838
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "201", description = "명함 교환 성공"),
39-
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "400", description = "FOLLOW_400: 이미 추가한 명함입니다"),
39+
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "409", description = "FOLLOW_409: 이미 추가한 명함입니다"),
4040
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "404", description = "COMMON_404: 검색 결과가 없습니다.")
4141
})
4242
ResponseEntity<ApiResponse<Void>> exchangeCard(Long userId, Long cardCode);

src/main/java/com/devpath/domain/user/dto/UserProfileRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.devpath.domain.user.enums.JobGroup;
44
import com.devpath.domain.user.enums.Level;
55
import com.devpath.domain.user.enums.TechStackName;
6+
import jakarta.validation.constraints.Email;
67
import jakarta.validation.constraints.NotBlank;
78
import jakarta.validation.constraints.NotNull;
89
import jakarta.validation.constraints.Size;
@@ -25,6 +26,7 @@ public class UserProfileRequest {
2526
private String phone;
2627

2728
@NotBlank(message = "이메일은 필수입니다")
29+
@Email(message = "유효한 이메일 형식이 아닙니다")
2830
private String email;
2931

3032
@NotBlank(message = "링크는 필수입니다")

0 commit comments

Comments
 (0)