Skip to content

Commit f225ca3

Browse files
authored
Fix user not found when listing projects (#331)
1 parent 0fca7f4 commit f225ca3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resolver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ package playground
2020

2121
import (
2222
"context"
23+
"time"
24+
2325
"github.com/Masterminds/semver"
2426
"github.com/dapperlabs/flow-playground-api/auth"
2527
"github.com/dapperlabs/flow-playground-api/blockchain"
@@ -31,7 +33,6 @@ import (
3133
"github.com/google/uuid"
3234
"github.com/onflow/cadence"
3335
"github.com/pkg/errors"
34-
"time"
3536
)
3637

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

446447
func (r *queryResolver) ProjectList(ctx context.Context) (*model.ProjectList, error) {
447-
user, err := r.auth.GetUser(ctx)
448+
user, err := r.auth.GetOrCreateUser(ctx)
448449
if err != nil {
449450
return nil, userErr.NewAuthorizationError(err.Error())
450451
}

0 commit comments

Comments
 (0)