Skip to content

Commit

Permalink
Make item query case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Nov 29, 2023
1 parent 7f95793 commit 0f9fffa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/routes/api.items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export async function loader({ request }: LoaderFunctionArgs) {
const items = await prisma.item.findMany({
where: {
missing: false,
name: { contains: q },
name: {
contains: q,
mode: "insensitive",
},
},
select: {
name: true,
Expand Down

0 comments on commit 0f9fffa

Please sign in to comment.