mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
c33729e185
12 changed files with 42 additions and 28 deletions
|
|
@ -61,7 +61,7 @@ function getDateFormat(date) {
|
|||
}
|
||||
|
||||
function getCommaSeparatedStringFormat(data) {
|
||||
return data.map(a => `'${a}'`).join(',');
|
||||
return data.map(a => `'${a}'`).join(',') || '';
|
||||
}
|
||||
|
||||
function getBetweenDates(field, start_at, end_at) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export async function getSession(req) {
|
|||
// Check database if does not exists in Redis
|
||||
if (!websiteId) {
|
||||
const website = await getWebsiteByUuid(websiteUuid);
|
||||
websiteId = website ? website.websiteId : null;
|
||||
websiteId = website ? website.id : null;
|
||||
}
|
||||
|
||||
if (!websiteId || websiteId === DELETED) {
|
||||
|
|
@ -47,7 +47,7 @@ export async function getSession(req) {
|
|||
}
|
||||
|
||||
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);
|
||||
const sessionUuid = uuid(websiteId, hostname, ip, userAgent);
|
||||
const sessionUuid = uuid(websiteUuid, hostname, ip, userAgent);
|
||||
|
||||
let sessionId = null;
|
||||
let session = null;
|
||||
|
|
@ -61,7 +61,7 @@ export async function getSession(req) {
|
|||
// Check database if does not exists in Redis
|
||||
if (!sessionId) {
|
||||
session = await getSessionByUuid(sessionUuid);
|
||||
sessionId = session ? session.sessionId : null;
|
||||
sessionId = session ? session.id : null;
|
||||
}
|
||||
|
||||
if (!sessionId) {
|
||||
|
|
@ -97,7 +97,10 @@ export async function getSession(req) {
|
|||
}
|
||||
|
||||
return {
|
||||
websiteId: websiteId,
|
||||
website: {
|
||||
websiteId,
|
||||
websiteUuid,
|
||||
},
|
||||
session,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue