chore: reduce unnecessary comments

pull/505/head
Josh Moore 7 months ago
parent 284a5a61be
commit 5a3077aff2

@ -1,10 +1,8 @@
const fs = require('fs-extra'); // Reading README.md
const path = require('path'); // Get the correct path for README.md
const fetch = require('node-fetch'); // Make calls to Reddit from Node.js
const qs = require('qs'); // Properly build a query for node-fetch POST
const { DateTime } = require('luxon'); // Time-related functions
//#region constants
const fs = require('fs-extra');
const path = require('path');
const fetch = require('node-fetch');
const qs = require('qs');
const { DateTime } = require('luxon');
// REDDIT_: For authentication with Reddit API. Oauth MUST be used. ID and Secret come from a "script" app type.
const REDDIT_USER = process.env.REDDIT_USER || 'username';
@ -29,15 +27,12 @@ const ENDPOINTS = {
// Helps POST data be submitted properly
const CONTENT_TYPE = 'application/x-www-form-urlencoded';
//#endregion
// Update the wiki
Promise.all([getLastRevision(), getToken()])
.then(([lastId, token]) => putWiki(lastId, token))
.catch((err) => (console.error(err), process.exit(1)));
//#region functions
/**
* Get the last revision ID on the Wiki. Required otherwise editing the wiki fails
*/
@ -104,4 +99,3 @@ function fixContent(content) {
return content;
} // * If this is highlighted weirdly, it's because of the 'updated timestamp' regex, don't worry about it
//#endregion

Loading…
Cancel
Save