mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
remove >= website created at logic
This commit is contained in:
parent
b10b490088
commit
a00972748f
8 changed files with 22 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import prisma from 'lib/prisma';
|
||||
import clickhouse from 'lib/clickhouse';
|
||||
import { runQuery, CLICKHOUSE, PRISMA } from 'lib/db';
|
||||
import { EVENT_TYPE } from 'lib/constants';
|
||||
import { DEFAULT_CREATED_AT, EVENT_TYPE } from 'lib/constants';
|
||||
import { loadWebsite } from 'lib/query';
|
||||
|
||||
export async function getSessionMetrics(
|
||||
|
|
@ -21,7 +21,7 @@ async function relationalQuery(
|
|||
criteria: { startDate: Date; endDate: Date; column: string; filters: object },
|
||||
) {
|
||||
const website = await loadWebsite(websiteId);
|
||||
const resetDate = new Date(website?.resetAt || website?.createdAt);
|
||||
const resetDate = new Date(website?.resetAt || DEFAULT_CREATED_AT);
|
||||
const { startDate, endDate, column, filters = {} } = criteria;
|
||||
const { toUuid, parseFilters, rawQuery } = prisma;
|
||||
const params: any = [websiteId, resetDate, startDate, endDate];
|
||||
|
|
@ -55,7 +55,7 @@ async function clickhouseQuery(
|
|||
const { startDate, endDate, column, filters = {} } = data;
|
||||
const { getDateFormat, parseFilters, getBetweenDates, rawQuery } = clickhouse;
|
||||
const website = await loadWebsite(websiteId);
|
||||
const resetDate = new Date(website?.resetAt || website?.createdAt);
|
||||
const resetDate = new Date(website?.resetAt || DEFAULT_CREATED_AT);
|
||||
const params = { websiteId };
|
||||
const { filterQuery } = parseFilters(filters, params);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue