Compare commits

...

2 Commits

Author SHA1 Message Date
Klaus bbf3fc04b6 본인인증 - gender 값 리턴 2025-02-03 19:08:22 +09:00
Klaus 7657f779b5 본인인증 - 19세 미만 본인인증 불가 메시지 년도 수정
- 2005 -> 올해년도 - 19로 변경
2025-02-03 18:57:28 +09:00
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,3 @@
package kr.co.vividnext.sodalive.member.auth
data class AuthResponse(val gender: Int)

View File

@ -73,7 +73,7 @@ class AuthService(
}
@Transactional
fun authenticate(certificate: AuthVerifyCertificate, memberId: Long) {
fun authenticate(certificate: AuthVerifyCertificate, memberId: Long): AuthResponse {
val memberIds = repository.getActiveMemberIdsByDi(di = certificate.di)
if (memberIds.size >= 3) {
throw SodaException(
@ -96,8 +96,9 @@ class AuthService(
auth.member = member
repository.save(auth)
return AuthResponse(gender = certificate.gender)
} else {
throw SodaException("2005년 1월 1일 이전 출생자만 본인인증이 가능합니다.")
throw SodaException("${nowYear - 19}년 1월 1일 이전 출생자만 본인인증이 가능합니다.")
}
}
}