Skip to content

Commit

Permalink
fix: removed unecessary name from query
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundesjg committed May 17, 2024
1 parent 2d14d3a commit da491dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shelter/ShelterSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ShelterSearch {
const search = `${this.formProps.search.toLowerCase()}`;

const results = await this.prismaService.$queryRaw<{ id: string }[]>(
Prisma.sql`SELECT id, name FROM shelters WHERE lower(unaccent(address)) LIKE '%' || unaccent(${search}) || '%' OR lower(unaccent(name)) LIKE '%' || unaccent(${search}) || '%';`,
Prisma.sql`SELECT id FROM shelters WHERE lower(unaccent(address)) LIKE '%' || unaccent(${search}) || '%' OR lower(unaccent(name)) LIKE '%' || unaccent(${search}) || '%';`,
);

return {
Expand Down

0 comments on commit da491dc

Please sign in to comment.