mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Return array of records
This commit is contained in:
parent
fc1f2c9cd3
commit
6bdceabc65
1 changed files with 2 additions and 4 deletions
|
|
@ -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 { rawQuery } = clickhouse;
|
||||||
|
|
||||||
const result = rawQuery(
|
return rawQuery(
|
||||||
`
|
`
|
||||||
select
|
select
|
||||||
count(distinct session_id) x
|
count(distinct session_id) x
|
||||||
|
|
@ -41,6 +41,4 @@ async function clickhouseQuery(websiteId: string): Promise<{ x: number }> {
|
||||||
return { x: Number(a.x) };
|
return { x: Number(a.x) };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return result[0] ?? null;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue