From 9576f8250283fe43dd30d527b91f787afb64986c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Mon, 20 Nov 2023 17:09:42 +0700
Subject: Fix product and location api not case sensitive

---
 src/app/api/location/route.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/app/api/location/route.tsx')

diff --git a/src/app/api/location/route.tsx b/src/app/api/location/route.tsx
index bc4cfff..7139c6d 100644
--- a/src/app/api/location/route.tsx
+++ b/src/app/api/location/route.tsx
@@ -15,7 +15,7 @@ export async function GET(request: NextRequest) {
   const locations = await prisma.location.findMany({
     where: {
       companyId,
-      name: { contains: search ?? '' }
+      name: { mode: 'insensitive', contains: search ?? '' }
     },
     take: 20
   })
-- 
cgit v1.2.3

