mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Moved everything out of internal
This commit is contained in:
20
api/resolver_model_gallery.go
Normal file
20
api/resolver_model_gallery.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stashapp/stash/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (r *galleryResolver) ID(ctx context.Context, obj *models.Gallery) (string, error) {
|
||||
return strconv.Itoa(obj.ID), nil
|
||||
}
|
||||
|
||||
func (r *galleryResolver) Title(ctx context.Context, obj *models.Gallery) (*string, error) {
|
||||
return nil, nil // TODO remove this from schema
|
||||
}
|
||||
|
||||
func (r *galleryResolver) Files(ctx context.Context, obj *models.Gallery) ([]models.GalleryFilesType, error) {
|
||||
baseURL, _ := ctx.Value(BaseURLCtxKey).(string)
|
||||
return obj.GetFiles(baseURL), nil
|
||||
}
|
||||
Reference in New Issue
Block a user