bugfix to history

This commit is contained in:
Erik 2023-02-23 00:29:09 +02:00
parent 52d3b141c4
commit 85448f9616
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
2 changed files with 1 additions and 2 deletions

View File

@ -48,7 +48,6 @@ class UserWrapper {
let points = p;
// Imported cases may have false or null
if (typeof points !== 'number') points = 0;
console.log(points);
if (expiration > 0) {
index.expirations.push({ points, expiration, id });
} else {

View File

@ -129,7 +129,7 @@ class HistoryCommand extends SlashCommand {
const [result] = await infractions.aggregate([{
$match: {
...query,
$or: [{ expiration: { $gt: Date.now() } }, { expiration: null }],
$or: [{ expiration: { $gt: Date.now() } }, { expiration: null }, { expiration: 0 }],
resolved: false
}
}, {