mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-11 21:45:53 +01:00
Merge branch 'dev' into feat/um-23-new-schema
This commit is contained in:
commit
ac5ec730d2
@ -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);
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ module.exports = {
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
webpack(config) {
|
||||
config.module.rules.push({
|
||||
test: /\.svg$/,
|
||||
|
@ -13,7 +13,7 @@ export default async (req: NextApiRequestAuth, res: NextApiResponse<RealtimeInit
|
||||
if (req.method === 'GET') {
|
||||
const { id: userId } = req.auth.user;
|
||||
|
||||
const websites = await getUserWebsites(userId);
|
||||
const websites = await getUserWebsites({ userId });
|
||||
const ids = websites.map(({ id }) => id);
|
||||
const token = createToken({ websites: ids }, secret());
|
||||
const data = await getRealtimeData(ids, subMinutes(new Date(), 30));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user