Moved everything out of internal

This commit is contained in:
Stash Dev
2019-02-09 18:53:08 -08:00
parent 5b5a72364f
commit 59782a377f
92 changed files with 87 additions and 85 deletions

View File

@@ -1,22 +0,0 @@
package api
import (
"context"
"github.com/stashapp/stash/internal/models"
"strconv"
)
func (r *queryResolver) FindGallery(ctx context.Context, id string) (*models.Gallery, error) {
qb := models.NewGalleryQueryBuilder()
idInt, _ := strconv.Atoi(id)
return qb.Find(idInt)
}
func (r *queryResolver) FindGalleries(ctx context.Context, filter *models.FindFilterType) (models.FindGalleriesResultType, error) {
qb := models.NewGalleryQueryBuilder()
galleries, total := qb.Query(filter)
return models.FindGalleriesResultType{
Count: total,
Galleries: galleries,
}, nil
}