Adds image retrieval endpoint

This commit is contained in:
2026-05-14 14:29:52 -05:00
parent 63e015400b
commit aff0872e38
8 changed files with 121 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
package net.halfbinary.scavengerhuntapi.controller
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import net.halfbinary.scavengerhuntapi.model.PhotoId
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("admin")
class AdminController {
@PreAuthorize("hasRole('ADMIN')")
@Tag(name = "Admin")
@PostMapping("/admin/photo/{photoId}")
@Operation(summary = "Sets a review status for the specified photo")
fun reviewPhoto(@PathVariable photoId: PhotoId) {
TODO("Set a review status for the specified photo, and update the photo record's status change timestamp")
}
}