Implements get photos for an item
This commit is contained in:
@@ -30,7 +30,7 @@ class ItemController(private val huntService: HuntService) {
|
||||
|
||||
@GetMapping("/{itemId}")
|
||||
fun getItem(@PathVariable huntId: HuntId, @PathVariable itemId: ItemId): ResponseEntity<ItemResponse> {
|
||||
TODO("Get detailed information about the specified Item for the specified Hunt")
|
||||
TODO("Maybe not needed: Get detailed information about the specified Item for the specified Hunt")
|
||||
}
|
||||
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
|
||||
@@ -61,8 +61,9 @@ class TeamController(private val teamService: TeamService, private val photoServ
|
||||
@Operation(summary = "Get list of photo information for the specified Team, Hunt, and Item")
|
||||
fun getItemPhotos(@PathVariable huntId: HuntId,
|
||||
@PathVariable teamId: TeamId,
|
||||
@PathVariable itemId: ItemId): ResponseEntity<List<PhotoResponse>> {
|
||||
TODO("Get list of photo information for the specified Team, Hunt, and Item")
|
||||
@PathVariable itemId: ItemId,
|
||||
authentication: Authentication): ResponseEntity<List<PhotoResponse>> {
|
||||
return ResponseEntity.ok(photoService.getItemPhotos(huntId, teamId, itemId, authentication.name))
|
||||
}
|
||||
|
||||
@PatchMapping("/{teamId}/item/{itemId}/photo/{photoId}")
|
||||
|
||||
Reference in New Issue
Block a user