Parsed an int to be an in (BAD).
This commit is contained in:
parent
f91be3aa28
commit
f4213888a8
|
@ -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}`)
|
||||
|
|
Loading…
Reference in New Issue
Block a user