mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
fix subreddit watcher
This commit is contained in:
parent
a467b08878
commit
fbd3ff617a
1 changed files with 1 additions and 2 deletions
|
@ -265,8 +265,7 @@ func (sc *subredditsConsumer) Consume(delivery rmq.Delivery) {
|
|||
i := rand.Intn(len(watchers))
|
||||
watcher := watchers[i]
|
||||
|
||||
acc, _ := sc.accountRepo.GetByID(ctx, watcher.AccountID)
|
||||
rac := sc.reddit.NewAuthenticatedClient(acc.AccountID, acc.RefreshToken, acc.AccessToken)
|
||||
rac := sc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
||||
sps, err := rac.SubredditHot(ctx,
|
||||
subreddit.Name,
|
||||
reddit.WithQuery("limit", "100"),
|
||||
|
|
Loading…
Reference in a new issue