Skip to content

Commit

Permalink
Fix user not found when listing projects (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Oct 3, 2023
1 parent 0fca7f4 commit f225ca3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ package playground

import (
"context"
"time"

"github.com/Masterminds/semver"
"github.com/dapperlabs/flow-playground-api/auth"
"github.com/dapperlabs/flow-playground-api/blockchain"
Expand All @@ -31,7 +33,6 @@ import (
"github.com/google/uuid"
"github.com/onflow/cadence"
"github.com/pkg/errors"
"time"
)

type Resolver struct {
Expand Down Expand Up @@ -444,7 +445,7 @@ func (r *queryResolver) Account(_ context.Context, address model.Address, projec
}

func (r *queryResolver) ProjectList(ctx context.Context) (*model.ProjectList, error) {
user, err := r.auth.GetUser(ctx)
user, err := r.auth.GetOrCreateUser(ctx)
if err != nil {
return nil, userErr.NewAuthorizationError(err.Error())
}
Expand Down

0 comments on commit f225ca3

Please sign in to comment.