Remove unneeded code

This commit is contained in:
2025-11-01 21:29:07 -07:00
parent de9c4690d2
commit 982b412eeb
3 changed files with 4 additions and 6 deletions

View File

@@ -28,10 +28,10 @@ const app = new Elysia()
methods: ["POST", "GET"]
}))
app.get("/launcher/versions", (context) => launcherVersionsHandler(context, db))
app.get("/launcher/versions", () => launcherVersionsHandler(db))
app.get("/launcher/latest", launcherLatestHandler)
app.get("/launcher/loader/latest", launcherLoaderLatestHandler)
app.get("/launcher/loader/update-data", (context) => launcherLoaderUpdateDataHandler(context, db))
app.get("/launcher/loader/update-data", () => launcherLoaderUpdateDataHandler(db))
app.all("*", () => jsonResponse({ message: "No endpoint found (are you using the correct request method?)" }, 404))
app.listen(3342)

View File

@@ -1,10 +1,9 @@
import type { Context } from "elysia";
import { MySql2Database } from "drizzle-orm/mysql2";
import { launcherUpdates } from "../../../lib/tables";
import { eq } from "drizzle-orm";
import { jsonResponse } from "../../../lib/util";
export async function handler(context: Context, db: MySql2Database) {
export async function handler(db: MySql2Database) {
const versionsRaw = await db.select({
id: launcherUpdates.id,
releaseDate: launcherUpdates.releaseDate,

View File

@@ -1,10 +1,9 @@
import type { Context } from "elysia";
import { MySql2Database } from "drizzle-orm/mysql2";
import { launcherGames, launcherVersions } from "../../lib/tables";
import { eq } from "drizzle-orm";
import { jsonResponse } from "../../lib/util";
export async function handler(context: Context, db: MySql2Database) {
export async function handler(db: MySql2Database) {
const versionsRaw = await db.select({
id: launcherVersions.id,
versionName: launcherVersions.versionName,