feat: Improve search functionality by using case-insensitive search for adventure location and name
This commit is contained in:
@@ -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)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user