Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Remove bigint.

Brian Caoa9617cb70477
diff --git a/lib/types.ts b/lib/types.ts
index 2bff72b9b..2e1ed986c 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -104,7 +104,7 @@ export interface WebsiteEventDataFields {
field: string;
type: number;
value?: string;
- total: bigint;
+ total: number;
}
export interface WebsitePageviews {
diff --git a/pages/api/event-data/stats.ts b/pages/api/event-data/stats.ts
index 00b7f5b91..8fdf9438b 100644
--- a/pages/api/event-data/stats.ts
+++ b/pages/api/event-data/stats.ts
@@ -32,10 +32,10 @@ export default async (
const data = results.reduce(
(obj, row) => {
- obj.records += row.total;
+ obj.records += Number(row.total);
return obj;
},
- { fields: results.length, records: BigInt(0) },
+ { fields: results.length, records: 0 },
);
return ok(res, data);