Remove unneeded code
This commit is contained in:
@@ -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)
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user