This commit is contained in:
2025-05-27 13:03:07 +05:00
parent 192d3c857b
commit edfa56270e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4,9 +4,9 @@
"": {
"name": "irth-backend",
"dependencies": {
"@elysiajs/cors": "^1.2.0",
"@elysiajs/cors": "^1.3.3",
"drizzle-orm": "^0.41.0",
"drizzle-typebox": "^0.3.1",
"drizzle-typebox": "^0.3.3",
"elysia": "^1.3.1",
"got": "^14.4.7",
"node-cron": "^3.0.3",
+2 -2
View File
@@ -343,7 +343,7 @@ export const unitsController = new Elysia({ prefix: "/units" })
const floorMap = new Map<
string | number,
{
floor: string | number;
floor: number;
East: {
types: Record<string, number>;
totalUnits: number;
@@ -402,7 +402,7 @@ export const unitsController = new Elysia({ prefix: "/units" })
}
}
// Преобразуем Map в массив и сортируем по этажам
return Array.from(floorMap.values());
return Array.from(floorMap.values()).sort((a, b) => a.floor - b.floor);
} catch (err) {
console.log((err as Error).message);
return status(500, "Internal server error");