Fixed search. Updated queries to not use domain.

This commit is contained in:
Mike Cao 2025-02-11 05:40:23 -08:00
parent b4f04a8729
commit 1d15a88370
5 changed files with 8 additions and 10 deletions

View file

@ -95,7 +95,7 @@ function getFilterQuery(filters: QueryFilters = {}, options: QueryOptions = {})
arr.push(`and ${mapFilter(column, operator, name)}`);
if (name === 'referrer') {
arr.push('and referrer_domain != hostname');
arr.push(`and referrer_domain != hostname`);
}
}
@ -145,7 +145,6 @@ async function parseFilters(websiteId: string, filters: QueryFilters = {}, optio
...getFilterParams(filters),
websiteId,
startDate: maxDate(filters.startDate, new Date(website?.resetAt)),
websiteDomain: website.domain,
},
};
}
@ -162,7 +161,7 @@ async function pagedQuery(
const statements = [
orderBy && `order by ${orderBy} ${direction}`,
+size > 0 && `limit ${+size} offset ${offset}`,
+size > 0 && `limit ${+size} offset ${+offset}`,
]
.filter(n => n)
.join('\n');