mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-04-18 21:45:06 -04:00
Add support for subreddit about API
This commit is contained in:
@@ -64,4 +64,15 @@ async function processSubredditAbout(subreddit, redis, fetch, RedditAPI) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = processSubredditAbout;
|
||||
async function processJsonSubredditAbout(json, parsed) {
|
||||
if (!parsed) {
|
||||
json = JSON.parse(json);
|
||||
}
|
||||
|
||||
return returnRelevantKeys(json);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
processSubredditAbout,
|
||||
processJsonSubredditAbout
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user