mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
switch to Result
This commit is contained in:
@@ -164,18 +164,18 @@ func OAuthLogin(ctx *m.ReqContext) {
|
||||
}
|
||||
|
||||
// add/update user in grafana
|
||||
userQuery := &m.UpsertUserCommand{
|
||||
cmd := &m.UpsertUserCommand{
|
||||
ExternalUser: &extUser,
|
||||
SignupAllowed: connect.IsSignupAllowed(),
|
||||
}
|
||||
err = login.UpsertUser(ctx, userQuery)
|
||||
err = login.UpsertUser(ctx, cmd)
|
||||
if err != nil {
|
||||
redirectWithError(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
// login
|
||||
loginUserWithUser(userQuery.User, ctx)
|
||||
loginUserWithUser(cmd.Result, ctx)
|
||||
|
||||
metrics.M_Api_Login_OAuth.Inc()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user