Sort Sites & Networks alphabetically

This commit is contained in:
headlesdev
2025-05-18 17:01:25 +02:00
parent 56571ba65a
commit 9851c872ca
2 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -15,7 +15,11 @@ export async function GET(request: NextRequest) {
id: Number(siteId),
},
include: {
networks: true, // Include all network relationships
networks: {
orderBy: {
name: 'asc',
},
},
},
});
+8 -1
View File
@@ -30,8 +30,15 @@ export async function GET(request: NextRequest) {
mode: "insensitive",
},
},
orderBy: {
name: 'asc',
},
include: {
networks: true,
networks: {
orderBy: {
name: 'asc',
},
},
},
});
const total = await prisma.site.count({