Implements get photo information endpoint
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user