Implements get photo information endpoint

This commit is contained in:
2026-05-14 13:01:42 -05:00
parent 1585b6eb7d
commit b349380c93
7 changed files with 53 additions and 11 deletions

View File

@@ -69,8 +69,9 @@ class TeamController(private val teamService: TeamService, private val photoServ
fun getPhotoInfo(@PathVariable huntId: HuntId,
@PathVariable teamId: TeamId,
@PathVariable itemId: ItemId,
@PathVariable photoId: PhotoId): ResponseEntity<PhotoResponse> {
TODO("Get photo information for the specified Team, Hunt, Item, and Photo. Join on the Hunter table to get the Hunter name. Also verify that the requesting user is either an admin or is on the same Hunt and Team as the Hunter who submitted the Photo")
@PathVariable photoId: PhotoId,
authentication: Authentication): ResponseEntity<PhotoResponse> {
return ResponseEntity.ok(photoService.getPhotoInfo(huntId, teamId, itemId, photoId, authentication.name))
}
@GetMapping("/{teamId}/item/{itemId}/photo/{photoId}/file")