mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 08:54:10 +01:00
* Add new configuration options * Refactor scan/clean * Schema changes * Add details to galleries * Remove redundant code * Refine thumbnail generation * Gallery overhaul * Don't allow modifying zip gallery images * Show gallery card overlays * Hide zoom slider when not in grid mode
23 lines
644 B
Go
23 lines
644 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"strconv"
|
|
|
|
"github.com/stashapp/stash/pkg/models"
|
|
)
|
|
|
|
func (r *queryResolver) FindGallery(ctx context.Context, id string) (*models.Gallery, error) {
|
|
qb := models.NewGalleryQueryBuilder()
|
|
idInt, _ := strconv.Atoi(id)
|
|
return qb.Find(idInt, nil)
|
|
}
|
|
|
|
func (r *queryResolver) FindGalleries(ctx context.Context, galleryFilter *models.GalleryFilterType, filter *models.FindFilterType) (*models.FindGalleriesResultType, error) {
|
|
qb := models.NewGalleryQueryBuilder()
|
|
galleries, total := qb.Query(galleryFilter, filter)
|
|
return &models.FindGalleriesResultType{
|
|
Count: total,
|
|
Galleries: galleries,
|
|
}, nil
|
|
}
|