Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
Signed-off-by: yxxhero <aiopsclub@163.com>
  • Loading branch information
yxxhero authored and gaius-qi committed Aug 31, 2021
1 parent c3dfd3a commit 6c66fb8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions manager/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ func (oa *baseOauth2) ExchangeUserByCode(code string, db *gorm.DB) (*model.User,
}
return &user, nil

} else {
user := model.User{}
if err := db.Model(model.User{}).Where("name = ?", u.Name).First(&user).Error; err != nil {
return nil, err
}
return &user, nil
}
user := model.User{}
if err := db.Model(model.User{}).Where("name = ?", u.Name).First(&user).Error; err != nil {
return nil, err
}
return &user, nil

}

0 comments on commit 6c66fb8

Please sign in to comment.