Implements remove photo endpoint
This commit is contained in:
@@ -16,6 +16,7 @@ import net.halfbinary.scavengerhuntapi.service.TeamService
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.security.core.Authentication
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PatchMapping
|
||||
import org.springframework.web.bind.annotation.PathVariable
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
@@ -64,6 +65,16 @@ class TeamController(private val teamService: TeamService, private val photoServ
|
||||
TODO("Get list of photo information for the specified Team, Hunt, and Item")
|
||||
}
|
||||
|
||||
@PatchMapping("/{teamId}/item/{itemId}/photo/{photoId}")
|
||||
@Operation(summary = "Mark the specified Photo as removed")
|
||||
fun removePhoto(@PathVariable huntId: HuntId,
|
||||
@PathVariable teamId: TeamId,
|
||||
@PathVariable itemId: ItemId,
|
||||
@PathVariable photoId: PhotoId,
|
||||
authentication: Authentication) {
|
||||
photoService.removePhoto(huntId, teamId, itemId, photoId, authentication.name)
|
||||
}
|
||||
|
||||
@GetMapping("/{teamId}/item/{itemId}/photo/{photoId}")
|
||||
@Operation(summary = "Get photo information for the specified Team, Hunt, Item, and Photo")
|
||||
fun getPhotoInfo(@PathVariable huntId: HuntId,
|
||||
|
||||
Reference in New Issue
Block a user