mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
05f01cd09e
@ -47,7 +47,7 @@ export default async (
|
||||
return ok(res, { token, user });
|
||||
}
|
||||
|
||||
const token = createSecureToken(user.id, secret());
|
||||
const token = createSecureToken({ userId: user.id }, secret());
|
||||
|
||||
return ok(res, { token, user });
|
||||
}
|
||||
|
@ -53,7 +53,24 @@ async function relationalQuery(data: {
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(data) {
|
||||
async function clickhouseQuery(data: {
|
||||
id: string;
|
||||
websiteId: string;
|
||||
url: string;
|
||||
referrer?: string;
|
||||
pageTitle?: string;
|
||||
eventName?: string;
|
||||
hostname?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
device?: string;
|
||||
screen?: string;
|
||||
language?: string;
|
||||
country?: string;
|
||||
subdivision1?: string;
|
||||
subdivision2?: string;
|
||||
city?: string;
|
||||
}) {
|
||||
const {
|
||||
websiteId,
|
||||
id: sessionId,
|
||||
|
@ -50,7 +50,23 @@ async function relationalQuery(data: {
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(data) {
|
||||
async function clickhouseQuery(data: {
|
||||
id: string;
|
||||
websiteId: string;
|
||||
url: string;
|
||||
referrer?: string;
|
||||
pageTitle?: string;
|
||||
hostname?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
device?: string;
|
||||
screen?: string;
|
||||
language?: string;
|
||||
country?: string;
|
||||
subdivision1?: string;
|
||||
subdivision2?: string;
|
||||
city?: string;
|
||||
}) {
|
||||
const {
|
||||
websiteId,
|
||||
id: sessionId,
|
||||
|
@ -72,6 +72,12 @@
|
||||
let currentPageTitle = document.title;
|
||||
let cache;
|
||||
|
||||
if (currentRef.substring(0, 4) === 'http') {
|
||||
if ((currentRef = currentRef.split('/')[2].split(':')[0] === hostname)) {
|
||||
currentRef = '/' + currentRef.split('/').splice(3).join('/');
|
||||
}
|
||||
}
|
||||
|
||||
/* Collect metrics */
|
||||
|
||||
const getPayload = () => ({
|
||||
|
Loading…
Reference in New Issue
Block a user