mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Add batch.PhotosResponse and update Swagger docs #271
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user