본인인증 - gender 값 리턴

This commit is contained in:
Klaus 2025-02-03 19:08:22 +09:00
parent 7657f779b5
commit bbf3fc04b6
2 changed files with 5 additions and 1 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 @Transactional
fun authenticate(certificate: AuthVerifyCertificate, memberId: Long) { fun authenticate(certificate: AuthVerifyCertificate, memberId: Long): AuthResponse {
val memberIds = repository.getActiveMemberIdsByDi(di = certificate.di) val memberIds = repository.getActiveMemberIdsByDi(di = certificate.di)
if (memberIds.size >= 3) { if (memberIds.size >= 3) {
throw SodaException( throw SodaException(
@ -96,6 +96,7 @@ class AuthService(
auth.member = member auth.member = member
repository.save(auth) repository.save(auth)
return AuthResponse(gender = certificate.gender)
} else { } else {
throw SodaException("${nowYear - 19}년 1월 1일 이전 출생자만 본인인증이 가능합니다.") throw SodaException("${nowYear - 19}년 1월 1일 이전 출생자만 본인인증이 가능합니다.")
} }