mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 23:47:44 +00:00
fix authenticated client call
This commit is contained in:
parent
51ba167a09
commit
ad62000372
1 changed files with 1 additions and 2 deletions
|
@ -195,8 +195,7 @@ func (sc *subredditsConsumer) Consume(delivery rmq.Delivery) {
|
||||||
i := rand.Intn(len(watchers))
|
i := rand.Intn(len(watchers))
|
||||||
watcher := watchers[i]
|
watcher := watchers[i]
|
||||||
|
|
||||||
acc, _ := sc.accountRepo.GetByID(sc, watcher.AccountID)
|
rac := sc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
||||||
rac := sc.reddit.NewAuthenticatedClient(acc.AccountID, acc.RefreshToken, acc.AccessToken)
|
|
||||||
sps, err := rac.SubredditNew(sc,
|
sps, err := rac.SubredditNew(sc,
|
||||||
subreddit.Name,
|
subreddit.Name,
|
||||||
reddit.WithQuery("before", before),
|
reddit.WithQuery("before", before),
|
||||||
|
|
Loading…
Reference in a new issue