본인인증 - gender 값 리턴
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
package kr.co.vividnext.sodalive.member.auth
|
||||||
|
|
||||||
|
data class AuthResponse(val gender: Int)
|
||||||
@@ -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일 이전 출생자만 본인인증이 가능합니다.")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user