resetDate should be a Date object.

This commit is contained in:
Mike Cao 2023-04-19 21:08:52 -07:00
parent 98028f1756
commit e63591e35d

View File

@ -23,7 +23,7 @@ async function relationalQuery(
const { startDate, endDate, filters = {} } = criteria; const { startDate, endDate, filters = {} } = criteria;
const { toUuid, getDateQuery, getTimestampInterval, parseFilters, rawQuery } = prisma; const { toUuid, getDateQuery, getTimestampInterval, parseFilters, rawQuery } = prisma;
const website = await loadWebsite(websiteId); const website = await loadWebsite(websiteId);
const resetDate = website?.resetAt || website?.createdAt; const resetDate = new Date(website?.resetAt || website?.createdAt);
const params: any = [websiteId, resetDate, startDate, endDate]; const params: any = [websiteId, resetDate, startDate, endDate];
const { filterQuery, joinSession } = parseFilters(filters, params); const { filterQuery, joinSession } = parseFilters(filters, params);