API: Add batch.PhotosResponse and update Swagger docs #271

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-07-10 11:08:17 +02:00
parent 41dc0febba
commit 2229ee32fb
5 changed files with 39 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ import (
// @Tags Photos
// @Accept json
// @Produce json
// @Success 200 {object} batch.PhotosForm
// @Success 200 {object} batch.PhotosResponse
// @Failure 400,401,403,404,429,500 {object} i18n.Response
// @Param photos body batch.PhotosRequest true "photos selection and values"
// @Router /api/v1/batch/photos/edit [post]
@@ -77,9 +77,9 @@ func BatchPhotosEdit(router *gin.RouterGroup) {
batchFrm := batch.NewPhotosForm(photos)
// Return models and form values.
data := gin.H{
"models": photos,
"values": batchFrm,
data := batch.PhotosResponse{
Models: photos,
Values: batchFrm,
}
c.JSON(http.StatusOK, data)