fix: correctly cache unsplash background

Resolves
https://vikunja.sentry.io/issues/6753151793/events/3d8773d79b9c4da0bf65140e4b7617b4/
This commit is contained in:
kolaente
2025-07-18 18:30:00 +02:00
parent c3fd659851
commit a5591c1603

View File

@@ -126,12 +126,15 @@ func getUnsplashPhotoInfoByID(photoID string) (photo *Photo, err error) {
log.Debugf("Image information for unsplash photo %s not cached, requesting from unsplash...", photoID)
photo := &Photo{}
err := doGet("photos/"+photoID, photo)
return photo, err
return *photo, err
})
if err != nil {
return nil, err
}
return result.(*Photo), nil
p := result.(Photo)
return &p, nil
}
// Search is the implementation to search on unsplash