Do not show cancelled events

This commit is contained in:
MartinBraquet
2026-03-11 12:12:21 +01:00
parent 33436c84a4
commit 3503110c64

View File

@@ -24,7 +24,9 @@ export const stats: APIHandler<'stats'> = async (_, _auth) => {
const [userCount, profileCount, eventsCount, messagesCount, genderStats] = await Promise.all([
pg.one(`SELECT COUNT(*)::int as count FROM users`),
pg.one(`SELECT COUNT(*)::int as count FROM profiles`),
pg.one(`SELECT COUNT(*)::int as count FROM events WHERE event_start_time > now()`),
pg.one(
`SELECT COUNT(*)::int as count FROM events WHERE event_start_time > now() and status = 'active'`,
),
getMessagesCount(),
pg.manyOrNone(
`SELECT gender, COUNT(*)::int as count FROM profiles WHERE gender IS NOT NULL GROUP BY gender`,