Rename DispatchCtx to Dispatch (#43563)
This commit is contained in:
@@ -38,7 +38,7 @@ func (o *Service) GetCurrentOAuthToken(ctx context.Context, user *models.SignedI
|
||||
}
|
||||
|
||||
authInfoQuery := &models.GetAuthInfoQuery{UserId: user.UserId}
|
||||
if err := bus.DispatchCtx(ctx, authInfoQuery); err != nil {
|
||||
if err := bus.Dispatch(ctx, authInfoQuery); err != nil {
|
||||
if errors.Is(err, models.ErrUserNotFound) {
|
||||
// Not necessarily an error. User may be logged in another way.
|
||||
logger.Debug("no OAuth token for user found", "userId", user.UserId, "username", user.Login)
|
||||
@@ -88,7 +88,7 @@ func (o *Service) GetCurrentOAuthToken(ctx context.Context, user *models.SignedI
|
||||
AuthId: authInfoQuery.Result.AuthId,
|
||||
OAuthToken: token,
|
||||
}
|
||||
if err := bus.DispatchCtx(ctx, updateAuthCommand); err != nil {
|
||||
if err := bus.Dispatch(ctx, updateAuthCommand); err != nil {
|
||||
logger.Error("failed to update auth info during token refresh", "userId", user.UserId, "username", user.Login, "error", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user