Fix connection

This commit is contained in:
2025-11-17 15:55:31 -07:00
parent fe82889b0a
commit e0611f66c9
4 changed files with 14 additions and 5 deletions

View File

@@ -4,7 +4,10 @@ import { getDatabaseConnection, jsonResponse } from '../../lib/util'
import { Context } from 'elysia'
export async function handler (context: Context) {
const { connection, db } = getDatabaseConnection()
const dbResult = getDatabaseConnection(0)
if (!dbResult)
return jsonResponse({ error: 'Failed to connect to database' }, 500)
const { connection, db } = dbResult
const platform = context.query.platform as string | undefined
const arch = context.query.arch as string | undefined