Adds/collects Hunter endpoints and cleans up the code a bit
This commit is contained in:
@@ -15,7 +15,7 @@ import java.time.LocalDateTime
|
||||
@Service
|
||||
class HuntService(private val huntRepository: HuntRepository) {
|
||||
fun getHunt(huntId: HuntId): Hunt {
|
||||
return huntRepository.findByIdOrNull(huntId)?.toDomain() ?: throw NotFoundException("No hunt with id ${huntId} found")
|
||||
return huntRepository.findByIdOrNull(huntId)?.toDomain() ?: throw NotFoundException("No hunt with id $huntId found")
|
||||
}
|
||||
|
||||
fun getAllHunts(status: HuntStatus?): List<Hunt> {
|
||||
|
||||
Reference in New Issue
Block a user