aboutsummaryrefslogtreecommitdiff
path: root/internal/service/gallery_service.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/gallery_service.go')
-rw-r--r--internal/service/gallery_service.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/service/gallery_service.go b/internal/service/gallery_service.go
index 23a8e85..89d5652 100644
--- a/internal/service/gallery_service.go
+++ b/internal/service/gallery_service.go
@@ -8,7 +8,9 @@ import (
)
// Gallery scans the configured roots and builds the gallery.
-func (s *galleryService) Gallery(ctx context.Context) ([]gallery.Photo, error) {
+func (s *galleryService) Gallery(ctx context.Context, query gallery.Query) ([]gallery.Photo, error) {
+ _ = query
+
s.mu.RLock()
defer s.mu.RUnlock()
@@ -22,5 +24,8 @@ func (s *galleryService) Gallery(ctx context.Context) ([]gallery.Photo, error) {
return nil, errors.New("gallery not loaded")
}
- return s.index.photos, nil
+ return gallery.QueryPhotos(
+ s.index.photos,
+ query,
+ ), nil
}