From 2430eaeca66a6825206b40af904a268b27bc1561 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 21 Nov 2023 15:40:12 +0700 Subject: Add order by name on location and product api --- src/app/api/location/route.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/app/api/location') diff --git a/src/app/api/location/route.tsx b/src/app/api/location/route.tsx index 7139c6d..1b5cb43 100644 --- a/src/app/api/location/route.tsx +++ b/src/app/api/location/route.tsx @@ -17,7 +17,8 @@ export async function GET(request: NextRequest) { companyId, name: { mode: 'insensitive', contains: search ?? '' } }, - take: 20 + take: 20, + orderBy: { name: 'asc' } }) return NextResponse.json(locations) -- cgit v1.2.3