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', {