diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-21 15:40:12 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-21 15:40:12 +0700 |
| commit | 2430eaeca66a6825206b40af904a268b27bc1561 (patch) | |
| tree | 7e453ee1869ec87114d07abea070b69fe2aa76cd /src/app/api/location/route.tsx | |
| parent | cf67f1fdb6863e7df50e34eda7c05681c82eb97d (diff) | |
Add order by name on location and product api
Diffstat (limited to 'src/app/api/location/route.tsx')
| -rw-r--r-- | src/app/api/location/route.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
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) |
