From f4213888a8af1c0850b845dd0b711c003bcd3dcf Mon Sep 17 00:00:00 2001 From: BurnyLlama Date: Mon, 1 Nov 2021 19:54:59 +0100 Subject: [PATCH] Parsed an int to be an in (BAD). --- libs/database/searcher.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/database/searcher.js b/libs/database/searcher.js index bb05f62..7c6d5d6 100644 --- a/libs/database/searcher.js +++ b/libs/database/searcher.js @@ -26,7 +26,7 @@ export default function searcher(table, matchField=undefined, matchQuery=undefin (resolve, reject) => { const pageCount = method === "get" ? 0 : - parseInt(sqlite + sqlite .prepare(` SELECT count(*) FROM ${simpleSanitize(table)} ${matchField ? `WHERE ${simpleSanitize(matchField)} = $matchQuery` : ""} @@ -34,7 +34,6 @@ export default function searcher(table, matchField=undefined, matchQuery=undefin .get({ matchQuery }) - ) if (method === "all" && page > pageCount) reject(`Page number too high! Page count: ${pageCount}`)