mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 05:17:39 -07:00
Correct logging statement + add missing returns
This commit is contained in:
parent
de3089937d
commit
35b9245dc4
1 changed files with 3 additions and 1 deletions
|
@ -78,18 +78,20 @@ export default hasConfig ? {
|
||||||
let date = Date.parse(timestamp);
|
let date = Date.parse(timestamp);
|
||||||
if (isNaN(date)) return false;
|
if (isNaN(date)) return false;
|
||||||
constructedFilters.push(`createdAt > ${date}`)
|
constructedFilters.push(`createdAt > ${date}`)
|
||||||
|
return false;
|
||||||
} else if (term.startsWith("before:")) {
|
} else if (term.startsWith("before:")) {
|
||||||
let timestamp = term.slice(7);
|
let timestamp = term.slice(7);
|
||||||
// Try to parse the timestamp as JavaScript Date
|
// Try to parse the timestamp as JavaScript Date
|
||||||
let date = Date.parse(timestamp);
|
let date = Date.parse(timestamp);
|
||||||
if (isNaN(date)) return false;
|
if (isNaN(date)) return false;
|
||||||
constructedFilters.push(`createdAt < ${date}`)
|
constructedFilters.push(`createdAt < ${date}`)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
||||||
logger.info(`Searching for ${query}`);
|
logger.info(`Searching for ${splitSearch.join(" ")}`);
|
||||||
logger.info(`Limit: ${limit}`);
|
logger.info(`Limit: ${limit}`);
|
||||||
logger.info(`Offset: ${offset}`);
|
logger.info(`Offset: ${offset}`);
|
||||||
logger.info(`Filters: ${constructedFilters}`)
|
logger.info(`Filters: ${constructedFilters}`)
|
||||||
|
|
Loading…
Reference in a new issue