generated from aura-ascend/template-service
update AccountService with getById
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package ltd.lulz.service
|
||||
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import java.util.UUID
|
||||
import ltd.lulz.model.AccountEntity
|
||||
import ltd.lulz.repository.AccountRepository
|
||||
import org.springframework.stereotype.Service
|
||||
@@ -16,4 +17,7 @@ class AccountService(
|
||||
fun create(entity: AccountEntity): Mono<AccountEntity> = accountRepository
|
||||
.save(entity)
|
||||
.doOnNext { log.debug { "account created with id: ${it.id}" } }
|
||||
|
||||
fun getById(id: UUID): Mono<AccountEntity> = accountRepository.findById(id)
|
||||
.doOnNext { log.debug { "found account by id: ${it.id}" } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user