mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
but for real this time
This commit is contained in:
parent
3bdd348d50
commit
ceade8fe74
1 changed files with 0 additions and 10 deletions
|
@ -165,16 +165,6 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
return
|
||||
}
|
||||
|
||||
defer func(acc *domain.Account) {
|
||||
if err = nc.accountRepo.Update(nc, acc); err != nil {
|
||||
nc.logger.Error("failed to update account",
|
||||
zap.Error(err),
|
||||
zap.String("account#reddit_account_id", id),
|
||||
zap.String("account#username", account.NormalizedUsername()),
|
||||
)
|
||||
}
|
||||
}(&account)
|
||||
|
||||
rac := nc.reddit.NewAuthenticatedClient(account.AccountID, account.RefreshToken, account.AccessToken)
|
||||
if account.TokenExpiresAt.Before(now.Add(5 * time.Minute)) {
|
||||
nc.logger.Debug("refreshing reddit token",
|
||||
|
|
Loading…
Reference in a new issue