world map

This commit is contained in:
Fred KISSIE
2025-11-20 08:19:11 +01:00
parent d6e8eb5307
commit 5d1f81a92c
13 changed files with 2643 additions and 192 deletions

View File

@@ -71,13 +71,13 @@ async function query(query: Q) {
);
}
const [totalRequests] = await db
const [all] = await db
.select({ total: count() })
.from(requestAuditLog)
.where(baseConditions);
const [totalBlocked] = await db
.select({ blocked: count() })
const [blocked] = await db
.select({ total: count() })
.from(requestAuditLog)
.where(and(baseConditions, eq(requestAuditLog.action, false)));
@@ -92,7 +92,11 @@ async function query(query: Q) {
.where(baseConditions)
.groupBy(requestAuditLog.location);
return { requestsPerCountry, totalBlocked, totalRequests };
return {
requestsPerCountry,
totalBlocked: blocked.total,
totalRequests: all.total
};
}
registry.registerPath({