mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
fix trending
This commit is contained in:
parent
fdcb900297
commit
f0c93a8bb9
1 changed files with 2 additions and 1 deletions
|
@ -222,7 +222,8 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
|
||||||
i = rand.Intn(len(watchers))
|
i = rand.Intn(len(watchers))
|
||||||
watcher = watchers[i]
|
watcher = watchers[i]
|
||||||
rac = tc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
rac = tc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
|
||||||
hps, err := tc.reddit.SubredditHot(tc, subreddit.Name, reddit.WithQuery("show", "all"), reddit.WithQuery("always_show_media", "1"))
|
|
||||||
|
hps, err := rac.SubredditHot(tc, subreddit.Name, reddit.WithQuery("show", "all"), reddit.WithQuery("always_show_media", "1"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tc.logger.Error("failed to fetch hot posts",
|
tc.logger.Error("failed to fetch hot posts",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
|
|
Loading…
Reference in a new issue