mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
fix getActiveVisitors return type
This commit is contained in:
parent
117cb6168c
commit
5468ca5dd3
2 changed files with 4 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ export async function getActiveVisitors(...args: [websiteId: string]) {
|
|||
async function relationalQuery(websiteId: string) {
|
||||
const { rawQuery } = prisma;
|
||||
|
||||
return rawQuery(
|
||||
const result = await rawQuery(
|
||||
`
|
||||
select count(distinct session_id) x
|
||||
from website_event
|
||||
|
|
@ -22,6 +22,8 @@ async function relationalQuery(websiteId: string) {
|
|||
`,
|
||||
{ websiteId, startAt: subMinutes(new Date(), 5) },
|
||||
);
|
||||
|
||||
return result[0] ?? null;
|
||||
}
|
||||
|
||||
async function clickhouseQuery(websiteId: string): Promise<{ x: number }> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue