Adds get ongoing Hunts endpoint
This commit is contained in:
@@ -46,6 +46,12 @@ class HuntController(private val huntService: HuntService) {
|
||||
return ResponseEntity.ok(huntService.getAllHunts(HuntStatus.UNSTARTED).map { it.toResponse() })
|
||||
}
|
||||
|
||||
@GetMapping("/ongoing")
|
||||
@Operation(summary = "Gets list of all ongoing Hunts")
|
||||
fun getOngoingHunts(): ResponseEntity<List<HuntResponse>> {
|
||||
return ResponseEntity.ok(huntService.getAllHunts(HuntStatus.ONGOING).map { it.toResponse() })
|
||||
}
|
||||
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
@Tag(name = "Admin")
|
||||
@PostMapping
|
||||
|
||||
Reference in New Issue
Block a user