1
0
Fork 0
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:
Sean Morley 2024-06-03 01:50:11 +00:00
parent c91c212fc0
commit 2a5c7c12b1

View file

@ -84,7 +84,7 @@ export const load: PageServerLoad = async ({ url, locals }) => {
.from(adventureTable)
.where(
and(
ilike(adventureTable.location, value),
ilike(adventureTable.location, `%${value}%`),
eq(adventureTable.userId, locals.user.id)
)
)
@ -101,7 +101,7 @@ export const load: PageServerLoad = async ({ url, locals }) => {
.from(adventureTable)
.where(
and(
ilike(adventureTable.name, value),
ilike(adventureTable.name, `%${value}%`),
eq(adventureTable.userId, locals.user.id)
)
)