From bfaf957ae28b497105e8f9f641178625a27d1d64 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 24 Sep 2025 17:06:55 +0100 Subject: [PATCH] removed func.get_comment() It is no longer needed Signed-off-by: max --- src/functions.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/functions.js b/src/functions.js index 50f320f..0f1097a 100644 --- a/src/functions.js +++ b/src/functions.js @@ -68,17 +68,6 @@ export function get_userID(username) { return -1 // If user is not present, return -1 } -export function get_comment(commentID) { // TODO scales like shit - const comments = require("../data/comments.json") - for (let i = 0; i < comments.comments.length; i++) { // Loop over every post - for (let j = 0; j < comments.comments[i].length; j++) { // Then every comment in that post - if (comments.comments[i][j]["id"] == commentID) { - return comments.comments[i][j] - }; - } - } - return -1 // If comment is not present, return -1 -} // This escapes some potentially dangerous HTML characters with their HTML entities // https://www.freeformatter.com/html-entities.html // accepts a string