Files
photoview/api/graphql/resolvers/timeline.go
Kostiantyn 029bf280e5 Bump GQLparser and GQLgen deps in API (#1234)
Co-authored-by: Konstantin Koval
2025-06-30 22:53:20 +03:00

25 lines
852 B
Go

package resolvers
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.76
import (
"context"
"time"
"github.com/photoview/photoview/api/graphql/auth"
"github.com/photoview/photoview/api/graphql/models"
"github.com/photoview/photoview/api/graphql/models/actions"
)
// MyTimeline is the resolver for the myTimeline field.
func (r *queryResolver) MyTimeline(ctx context.Context, paginate *models.Pagination, onlyFavorites *bool, fromDate *time.Time) ([]*models.Media, error) {
user := auth.UserFromContext(ctx)
if user == nil {
return nil, auth.ErrUnauthorized
}
return actions.MyTimeline(r.DB(ctx), user, paginate, onlyFavorites, fromDate)
}