-
-
Save theboreddev/6026276d42d5f6cf4cc388d62593de40 to your computer and use it in GitHub Desktop.
With registration email command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun create(user: User): User { | |
return withinTransaction { | |
val savedUser = userRepository.save(user) | |
eventsEngine.send(UserCreated(UUID.randomUUID().toString(), user)) | |
eventsEngine.send(SendRegistrationEmailEvent(UUID.randomUUID().toString(), user)) | |
User.create(savedUser) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment