mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
update api to new CH columns
This commit is contained in:
parent
36edbe2f4c
commit
96add409b6
19 changed files with 74 additions and 48 deletions
|
|
@ -60,6 +60,10 @@ function getDateFormat(date) {
|
|||
return `'${dateFormat(date, 'UTC:yyyy-mm-dd HH:MM:ss')}'`;
|
||||
}
|
||||
|
||||
function getCommaSeparatedStringFormat(data, column) {
|
||||
return data.map(obj => `'${obj[column]}'`).join(',');
|
||||
}
|
||||
|
||||
function getBetweenDates(field, start_at, end_at) {
|
||||
return `${field} between ${getDateFormat(start_at)}
|
||||
and ${getDateFormat(end_at)}`;
|
||||
|
|
@ -180,6 +184,7 @@ export default {
|
|||
getDateStringQuery,
|
||||
getDateQuery,
|
||||
getDateFormat,
|
||||
getCommaSeparatedStringFormat,
|
||||
getBetweenDates,
|
||||
getFilterQuery,
|
||||
parseFilters,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export async function getSession(req) {
|
|||
|
||||
if (!sessionId) {
|
||||
try {
|
||||
session = await createSession(websiteId, {
|
||||
session = await createSession(websiteId, website_uuid, {
|
||||
session_uuid,
|
||||
hostname,
|
||||
browser,
|
||||
|
|
@ -98,6 +98,7 @@ export async function getSession(req) {
|
|||
|
||||
return {
|
||||
website_id: websiteId,
|
||||
website_uuid: website_uuid,
|
||||
session,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue