From 038db61798837e38e37fc9a70d90f689699cf5d5 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 9 Nov 2022 13:54:03 -0500 Subject: [PATCH] switch subreddit posts url --- internal/reddit/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/reddit/client.go b/internal/reddit/client.go index ce31271..c3cd947 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -230,7 +230,7 @@ func (rc *Client) request(ctx context.Context, r *Request, errmap map[int]error, } func (rc *Client) subredditPosts(ctx context.Context, subreddit string, sort string, opts ...RequestOption) (*ListingResponse, error) { - url := fmt.Sprintf("https://www.reddit.com/r/%s/%s.json", subreddit, sort) + url := fmt.Sprintf("https://oauth.reddit.com/r/%s/%s.json", subreddit, sort) opts = append(rc.defaultOpts, opts...) opts = append(opts, []RequestOption{ WithMethod("GET"),