i was lazy ok

This commit is contained in:
2025-11-04 18:16:30 -07:00
parent 5a031c1dd1
commit 22ac21d79c
2 changed files with 3 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: localhost -- Host: localhost
-- Generation Time: Nov 04, 2025 at 02:35 AM -- Generation Time: Nov 05, 2025 at 01:16 AM
-- Server version: 12.0.2-MariaDB -- Server version: 12.0.2-MariaDB
-- PHP Version: 8.4.14 -- PHP Version: 8.4.14
@@ -33,7 +33,7 @@ CREATE TABLE `launchergames` (
`official` tinyint(1) NOT NULL DEFAULT 0, `official` tinyint(1) NOT NULL DEFAULT 0,
`verified` tinyint(1) NOT NULL DEFAULT 0, `verified` tinyint(1) NOT NULL DEFAULT 0,
`developer` varchar(32) DEFAULT NULL, `developer` varchar(32) DEFAULT NULL,
`cutOff` int(11) NOT NULL DEFAULT -1 `cutOff` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
-- -------------------------------------------------------- -- --------------------------------------------------------

View File

@@ -84,12 +84,7 @@ export async function handler(context: Context, db: MySql2Database) {
return false return false
}) })
const gamesRaw = await db.select().from(launcherGames).execute() const games = await db.select().from(launcherGames).execute()
const games = gamesRaw.map(v => ({
...v,
cutOff: v.cutOff === -1 ? null : v.cutOff
}))
return jsonResponse({ versions, games }) return jsonResponse({ versions, games })
} }