Skip to content

Commit

Permalink
delete :: saveUserRole 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed May 1, 2024
1 parent 253f99a commit 15656dd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/kotlin/com/msg/gauth/domain/auth/service/SignUpService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import org.springframework.security.crypto.password.PasswordEncoder
@TransactionalService
class SignUpService(
private val userRepository: UserRepository,
private val userRoleRepository: UserRoleRepository,
private val passwordEncoder: PasswordEncoder,
private val emailAuthRepository: EmailAuthRepository,
private val applicationEventPublisher: ApplicationEventPublisher
Expand Down Expand Up @@ -48,19 +47,8 @@ class SignUpService(

val savedUser = userRepository.save(user)

saveUserRole(user)

applicationEventPublisher.publishEvent(SignupLoggingEvent(user.email))

return savedUser.id
}

private fun saveUserRole(user: User) {
val userRole = UserRole(
user = user,
userRoleType = UserRoleType.ROLE_STUDENT
)

userRoleRepository.save(userRole)
}
}

0 comments on commit 15656dd

Please sign in to comment.