chore: reduce unnecessary comments

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

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

Loading…
Cancel
Save