Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Commit

Permalink
add code review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed Apr 19, 2020
1 parent 9145b52 commit 3e6ff4f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/middleware/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ func JwtConfigGenerate(jwtKey, realmName string, db *gorm.DB, l *zap.SugaredLogg
if err != nil {
return false
}
if usr.EmailEnabled && usr.AccountEnabled {
return true
}
return false
return usr.EmailEnabled && usr.AccountEnabled
},
Unauthorized: func(c *gin.Context, code int, message string) {
l.Error("invalid login detected")
Expand Down

0 comments on commit 3e6ff4f

Please sign in to comment.