not-an-aardvark / snoowrap

A JavaScript wrapper for the reddit API
MIT License
1.01k stars 125 forks source link

Subreddit.getSettings() calls wrong endpoint #342

Open steve2507 opened 2 years ago

steve2507 commented 2 years ago

I am trying to fetch all details for a given subreddit, and noticed that my getSettings() calls were always returning a 404;

[debug] Received a 404 status code from a `get` request sent to https://oauth.reddit.com/r/subreddit/about/edit?raw_json=1. ratelimitRemaining: 583

You may notice the endpoint is .../about/edit, instead of simply .../about. See also here: https://github.com/not-an-aardvark/snoowrap/blob/master/src/objects/Subreddit.js#L877

I confirmed a fix for this by simply removing /edit at the end of that path.