mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Fixed website search.
This commit is contained in:
parent
1ba6f30401
commit
0e144269ee
1 changed files with 6 additions and 9 deletions
|
|
@ -29,18 +29,15 @@ export async function getWebsites(
|
||||||
filters: WebsiteSearchFilter,
|
filters: WebsiteSearchFilter,
|
||||||
): Promise<FilterResult<Website[]>> {
|
): Promise<FilterResult<Website[]>> {
|
||||||
const { query } = filters;
|
const { query } = filters;
|
||||||
const mode = prisma.getQueryMode();
|
|
||||||
|
|
||||||
const where: Prisma.WebsiteWhereInput = {
|
const where: Prisma.WebsiteWhereInput = {
|
||||||
...criteria.where,
|
...criteria.where,
|
||||||
name: {
|
...prisma.getSearchParameters(query, [
|
||||||
contains: query ? query : undefined,
|
{
|
||||||
mode,
|
name: 'contains',
|
||||||
},
|
},
|
||||||
domain: {
|
{ domain: 'contains' },
|
||||||
contains: query ? query : undefined,
|
]),
|
||||||
mode,
|
|
||||||
},
|
|
||||||
deletedAt: null,
|
deletedAt: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue