1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00

catch polls that are expiring exactly in the current instant

This commit is contained in:
Hazelnoot
2025-05-12 13:47:12 -04:00
parent f01dc57ec9
commit 63950fea31

View File

@@ -95,7 +95,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (ps.expired) {
query.andWhere('poll.expiresAt IS NOT NULL');
query.andWhere('poll.expiresAt < :expiresMax', {
query.andWhere('poll.expiresAt <= :expiresMax', {
expiresMax: new Date(),
});
query.andWhere('poll.expiresAt >= :expiresMin', {