Fix 500 error

This commit is contained in:
2025-11-05 10:05:44 -07:00
parent 2e57668721
commit 1c1a963363
3 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ export const launcherVersions = mysqlTable('launcherversions', {
downloadUrls: text('downloadUrls').notNull(), downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(), platforms: text('platforms').notNull(),
executables: text('executables').notNull(), executables: text('executables').notNull(),
hidden: boolean('hidden').notNull().default(true), hidden: int('hidden').notNull().default(1),
game: int('game').notNull().default(0).references(() => launcherGames.id), game: int('game').notNull().default(0).references(() => launcherGames.id),
place: int('place').notNull().default(0), place: int('place').notNull().default(0),
sha512sums: text('sha512sums').notNull().default("[]") sha512sums: text('sha512sums').notNull().default("[]")
@@ -28,7 +28,7 @@ export const launcherUpdates = mysqlTable('launcherupdates', {
downloadUrls: text('downloadUrls').notNull(), downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(), platforms: text('platforms').notNull(),
executables: text('executables').notNull(), executables: text('executables').notNull(),
hidden: boolean('hidden').notNull().default(true), hidden: int('hidden').notNull().default(1),
place: int('place').notNull().default(0), place: int('place').notNull().default(0),
sha512sums: text('sha512sums').notNull().default("[]") sha512sums: text('sha512sums').notNull().default("[]")
}) })

View File

@@ -7,7 +7,7 @@ export async function handler(db: MySql2Database) {
id: launcherUpdates.id id: launcherUpdates.id
}) })
.from(launcherUpdates) .from(launcherUpdates)
.where(eq(launcherUpdates.hidden, false)) .where(eq(launcherUpdates.hidden, 0))
.orderBy(desc(launcherUpdates.place)) .orderBy(desc(launcherUpdates.place))
.limit(1) .limit(1)

View File

@@ -48,7 +48,7 @@ export async function handler(context: Context, db: MySql2Database) {
executables: launcherVersions.executables, executables: launcherVersions.executables,
sha512sums: launcherVersions.sha512sums sha512sums: launcherVersions.sha512sums
}).from(launcherVersions) }).from(launcherVersions)
.where(eq(launcherVersions.hidden, false)) .where(eq(launcherVersions.hidden, 0))
.orderBy( .orderBy(
asc(launcherVersions.game), asc(launcherVersions.game),
desc(launcherVersions.place) desc(launcherVersions.place)