bugfix to history

This commit is contained in:
Erik 2023-02-23 00:29:09 +02:00
parent 52d3b141c4
commit 85448f9616
Signed by untrusted user: 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; let points = p;
// Imported cases may have false or null // Imported cases may have false or null
if (typeof points !== 'number') points = 0; if (typeof points !== 'number') points = 0;
console.log(points);
if (expiration > 0) { if (expiration > 0) {
index.expirations.push({ points, expiration, id }); index.expirations.push({ points, expiration, id });
} else { } else {

View File

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