mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-04 20:55:19 +02:00
feat: Improve search functionality by using case-insensitive search for adventure location and name
This commit is contained in:
parent
c91c212fc0
commit
2a5c7c12b1
1 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ export const load: PageServerLoad = async ({ url, locals }) => {
|
||||||
.from(adventureTable)
|
.from(adventureTable)
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
ilike(adventureTable.location, value),
|
ilike(adventureTable.location, `%${value}%`),
|
||||||
eq(adventureTable.userId, locals.user.id)
|
eq(adventureTable.userId, locals.user.id)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -101,7 +101,7 @@ export const load: PageServerLoad = async ({ url, locals }) => {
|
||||||
.from(adventureTable)
|
.from(adventureTable)
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
ilike(adventureTable.name, value),
|
ilike(adventureTable.name, `%${value}%`),
|
||||||
eq(adventureTable.userId, locals.user.id)
|
eq(adventureTable.userId, locals.user.id)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue