Merge branch 'dev' into feat/um-23-new-schema

This commit is contained in:
Mike Cao 2022-11-18 03:21:55 -08:00
commit 4bc3d46efb
2 changed files with 3 additions and 6 deletions

View File

@ -12,17 +12,14 @@ export default function useRequireLogin() {
async function loadUser() {
setLoading(true);
const {
ok,
data: { user },
} = await get('/auth/verify');
const { ok, data } = await get('/auth/verify');
if (!ok) {
await router.push('/login');
return null;
}
setUser(user);
setUser(data.user);
setLoading(false);
}

View File

@ -54,7 +54,7 @@ async function clickhouseQuery(
const { filterQuery } = parseFilters(filters, params);
return rawQuery(
`select ${field} x, count(*) y
`select ${field} x, count(distinct session_id) y
from event as x
where website_id = $1
and rev_id = $2