From edfa56270e12e95cc816f7b41d9cf27c5d4cbdef Mon Sep 17 00:00:00 2001 From: Lanskikh Date: Tue, 27 May 2025 13:03:07 +0500 Subject: [PATCH] upd --- bun.lock | 4 ++-- src/controllers/units.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bun.lock b/bun.lock index 09e2716..e9df5b0 100644 --- a/bun.lock +++ b/bun.lock @@ -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", diff --git a/src/controllers/units.ts b/src/controllers/units.ts index 44dc084..737f53e 100644 --- a/src/controllers/units.ts +++ b/src/controllers/units.ts @@ -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; 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");