aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/resolvers/repo.go
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-06-19 00:35:56 +0100
committerMichael Muré <batolettre@gmail.com>2020-06-27 23:01:10 +0200
commit5f72b04ef8e84b1c367ca6874519706318e351f5 (patch)
tree6f73279d05130d3d6d83de1dad3a5b4ac25be080 /graphql/resolvers/repo.go
parente5a316e40c377a8563e92f62b0773ed34321a91a (diff)
downloadgit-bug-5f72b04ef8e84b1c367ca6874519706318e351f5.tar.gz
Use ErrNotAuthenticated
Diffstat (limited to 'graphql/resolvers/repo.go')
-rw-r--r--graphql/resolvers/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphql/resolvers/repo.go b/graphql/resolvers/repo.go
index f68ed3e0..009ccab6 100644
--- a/graphql/resolvers/repo.go
+++ b/graphql/resolvers/repo.go
@@ -152,10 +152,10 @@ func (repoResolver) Identity(_ context.Context, obj *models.Repository, prefix s
func (repoResolver) UserIdentity(ctx context.Context, obj *models.Repository) (models.IdentityWrapper, error) {
id, err := graphqlidentity.ForContext(ctx, obj.Repo)
- if err != nil {
- return nil, err
- } else if id == nil {
+ if err == graphqlidentity.ErrNotAuthenticated {
return nil, nil
+ } else if err != nil {
+ return nil, err
}
return models.NewLoadedIdentity(id.Identity), nil
}