switch to Result

This commit is contained in:
Dan Cech
2018-03-23 11:16:11 -04:00
parent d5dd1c9bca
commit a1b1d2fe80
6 changed files with 16 additions and 16 deletions

View File

@@ -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()