API: Apply "golangci-lint" recommendations #5330

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-11-22 09:25:01 +01:00
parent 264bc78d51
commit 4eac10c9d1
35 changed files with 146 additions and 146 deletions

View File

@@ -73,7 +73,7 @@ func BatchPhotosEdit(router *gin.RouterGroup) {
return
}
preloadedPhotos := map[string]*entity.Photo{}
var preloadedPhotos map[string]*entity.Photo
if hydrated, err := query.PhotoPreloadByUIDs(photos.UIDs()); err != nil {
log.Errorf("batch: failed to preload photo selection: %s", err)
@@ -107,7 +107,7 @@ func BatchPhotosEdit(router *gin.RouterGroup) {
// Refresh selected photos from database?
if !savedAny {
// Don't refresh.
} else if photos, count, err = search.BatchPhotos(frm.Photos, s); err != nil {
} else if photos, _, err = search.BatchPhotos(frm.Photos, s); err != nil {
log.Errorf("batch: %s (refresh selection)", clean.Error(err))
}