Rename DispatchCtx to Dispatch (#43563)

This commit is contained in:
idafurjes
2021-12-28 17:36:22 +01:00
committed by GitHub
parent 7936c4c522
commit 8e6d6af744
107 changed files with 291 additions and 291 deletions
+2 -2
View File
@@ -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
}