Refactoring part 2.4: Long func refactoring in graphql/resolvers (#1076)

* Split long functions and optimize code

* Addressing comments

* Remove unnecessary input param

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2024-10-11 12:31:49 +03:00
committed by GitHub
parent 7e0c38b5b4
commit dd90d476ad
10 changed files with 132 additions and 59 deletions

View File

@@ -10,6 +10,7 @@ import (
)
func (r *Resolver) Search(ctx context.Context, query string, limitMedia *int, limitAlbums *int) (*models.SearchResult, error) {
user := auth.UserFromContext(ctx)
if user == nil {
return nil, auth.ErrUnauthorized