mirror of
https://github.com/kremalicious/umami.git
synced 2024-06-23 17:56:24 +02:00
fix active visitors bug
This commit is contained in:
parent
b1d3970ea7
commit
7eb5d19576
|
@ -24,10 +24,10 @@ async function relationalQuery(websiteId: string) {
|
|||
);
|
||||
}
|
||||
|
||||
async function clickhouseQuery(websiteId: string): Promise<{ x: number }> {
|
||||
async function clickhouseQuery(websiteId: string): Promise<{ x: number }[]> {
|
||||
const { rawQuery } = clickhouse;
|
||||
|
||||
const result = rawQuery(
|
||||
return rawQuery(
|
||||
`
|
||||
select
|
||||
count(distinct session_id) x
|
||||
|
@ -41,6 +41,4 @@ async function clickhouseQuery(websiteId: string): Promise<{ x: number }> {
|
|||
return { x: Number(a.x) };
|
||||
});
|
||||
});
|
||||
|
||||
return result[0] ?? null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user