Browse Source
fix err shadowing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/196/head
Michael Telatynski
7 years ago
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with
2 additions and
2 deletions
-
src/github.com/matrix-org/go-neb/services/github/github.go
|
@ -61,8 +61,8 @@ type Service struct { |
|
|
func (s *Service) requireGithubClientFor(userID string) (cli *gogithub.Client, resp interface{}, err error) { |
|
|
func (s *Service) requireGithubClientFor(userID string) (cli *gogithub.Client, resp interface{}, err error) { |
|
|
cli = s.githubClientFor(userID, false) |
|
|
cli = s.githubClientFor(userID, false) |
|
|
if cli == nil { |
|
|
if cli == nil { |
|
|
r, err := database.GetServiceDB().LoadAuthRealm(s.RealmID) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
|
var r types.AuthRealm |
|
|
|
|
|
if r, err = database.GetServiceDB().LoadAuthRealm(s.RealmID); err != nil { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if ghRealm, ok := r.(*github.Realm); ok { |
|
|
if ghRealm, ok := r.(*github.Realm); ok { |
|
|