Fix sorting

This commit is contained in:
2025-11-01 21:31:46 -07:00
parent 4040d5abdd
commit d459dd5f32

View File

@@ -1,6 +1,6 @@
import { MySql2Database } from "drizzle-orm/mysql2"
import { launcherUpdates } from "../../lib/tables"
import { eq } from "drizzle-orm"
import { desc, eq } from "drizzle-orm"
export async function handler(db: MySql2Database) {
const version = await db.select({
@@ -8,7 +8,7 @@ export async function handler(db: MySql2Database) {
})
.from(launcherUpdates)
.where(eq(launcherUpdates.hidden, false))
.orderBy(launcherUpdates.place)
.orderBy(desc(launcherUpdates.place))
.limit(1)
.execute()