Adds/collects Hunter endpoints and cleans up the code a bit

This commit is contained in:
2026-05-12 23:54:27 -05:00
parent 4a1077833e
commit b2ba9ce676
17 changed files with 115 additions and 60 deletions

View File

@@ -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> {