From 5a3077aff25c4ffbe4f955e266632103feab1e5c Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 18 Oct 2023 13:15:58 -0600 Subject: [PATCH] chore: reduce unnecessary comments --- _wiki.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/_wiki.js b/_wiki.js index 3f48685..3d98d9d 100644 --- a/_wiki.js +++ b/_wiki.js @@ -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