From 69b27a4317bcbd3f21d1e9148d9583725e2b31c4 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 8 Feb 2026 01:26:43 -0700 Subject: [PATCH] Consistency fixes again --- src/routes/account/change-password/post.ts | 2 +- src/routes/account/change-username/post.ts | 2 +- src/routes/account/forgot-password/post.ts | 2 +- src/routes/account/forgot-username/post.ts | 2 +- src/routes/account/login/post.ts | 2 +- src/routes/account/register/post.ts | 2 +- src/routes/account/reset-password/post.ts | 2 +- src/routes/berrydash/account/get.ts | 2 +- src/routes/berrydash/account/save/get.ts | 2 +- src/routes/berrydash/account/save/post.ts | 2 +- src/routes/berrydash/chatroom/report/post.ts | 2 +- src/routes/berrydash/icon-marketplace/get.ts | 2 +- src/routes/berrydash/icon-marketplace/icon/get.ts | 2 +- src/routes/berrydash/icon-marketplace/post.ts | 2 +- src/routes/berrydash/icon-marketplace/upload/post.ts | 2 +- src/routes/berrydash/latest-version/get.ts | 2 +- src/routes/berrydash/leaderboard/get.ts | 2 +- src/routes/berrydash/profile/get.ts | 2 +- src/routes/berrydash/profile/posts/delete.ts | 2 +- src/routes/berrydash/profile/posts/get.ts | 2 +- src/routes/berrydash/profile/posts/post.ts | 2 +- src/routes/berrydash/profile/posts/put.ts | 2 +- src/routes/berrydash/splash-text/get.ts | 2 +- src/routes/berrydash/splash-text/post.ts | 2 +- src/routes/can-load-client.ts | 2 +- src/routes/get-verify-code.ts | 2 +- src/routes/launcher/download.ts | 2 +- src/routes/launcher/latest.ts | 2 +- src/routes/launcher/loader/latest.ts | 2 +- src/routes/launcher/loader/update-data.ts | 2 +- src/routes/launcher/versions.ts | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/routes/account/change-password/post.ts b/src/routes/account/change-password/post.ts index cbc4a76..9c54a13 100644 --- a/src/routes/account/change-password/post.ts +++ b/src/routes/account/change-password/post.ts @@ -14,7 +14,7 @@ type Body = { newPassword: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/account/change-username/post.ts b/src/routes/account/change-username/post.ts index bbdbb32..e9ed9f8 100644 --- a/src/routes/account/change-username/post.ts +++ b/src/routes/account/change-username/post.ts @@ -13,7 +13,7 @@ type Body = { newUsername: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/account/forgot-password/post.ts b/src/routes/account/forgot-password/post.ts index eafb96d..4ca7240 100644 --- a/src/routes/account/forgot-password/post.ts +++ b/src/routes/account/forgot-password/post.ts @@ -17,7 +17,7 @@ type Body = { email: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) if (!dbInfo0) diff --git a/src/routes/account/forgot-username/post.ts b/src/routes/account/forgot-username/post.ts index 7a2823c..36bec4a 100644 --- a/src/routes/account/forgot-username/post.ts +++ b/src/routes/account/forgot-username/post.ts @@ -16,7 +16,7 @@ type Body = { email: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) if (!dbInfo0) diff --git a/src/routes/account/login/post.ts b/src/routes/account/login/post.ts index cf87528..e813d24 100644 --- a/src/routes/account/login/post.ts +++ b/src/routes/account/login/post.ts @@ -9,7 +9,7 @@ type Body = { password: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/account/register/post.ts b/src/routes/account/register/post.ts index 8167105..b110698 100644 --- a/src/routes/account/register/post.ts +++ b/src/routes/account/register/post.ts @@ -18,7 +18,7 @@ type Body = { email: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/account/reset-password/post.ts b/src/routes/account/reset-password/post.ts index da2aac0..cb9de59 100644 --- a/src/routes/account/reset-password/post.ts +++ b/src/routes/account/reset-password/post.ts @@ -17,7 +17,7 @@ type Body = { password: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) if (!dbInfo0) diff --git a/src/routes/berrydash/account/get.ts b/src/routes/berrydash/account/get.ts index bd69906..0b85a65 100644 --- a/src/routes/berrydash/account/get.ts +++ b/src/routes/berrydash/account/get.ts @@ -3,7 +3,7 @@ import { getDatabaseConnection, jsonResponse } from '../../../lib/util' import { berryDashUserData, users } from '../../../lib/tables' import { eq, sql } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/account/save/get.ts b/src/routes/berrydash/account/save/get.ts index 776dfe1..5e6b537 100644 --- a/src/routes/berrydash/account/save/get.ts +++ b/src/routes/berrydash/account/save/get.ts @@ -8,7 +8,7 @@ import { checkAuthorization } from '../../../../lib/auth' import { berryDashUserData, users } from '../../../../lib/tables' import { eq } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/account/save/post.ts b/src/routes/berrydash/account/save/post.ts index 6d71e82..4a93bd0 100644 --- a/src/routes/berrydash/account/save/post.ts +++ b/src/routes/berrydash/account/save/post.ts @@ -12,7 +12,7 @@ type Body = { saveData: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/chatroom/report/post.ts b/src/routes/berrydash/chatroom/report/post.ts index 3537009..2c1cab6 100644 --- a/src/routes/berrydash/chatroom/report/post.ts +++ b/src/routes/berrydash/chatroom/report/post.ts @@ -13,7 +13,7 @@ type Body = { reason: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/icon-marketplace/get.ts b/src/routes/berrydash/icon-marketplace/get.ts index cb0ef4a..fc48ee5 100644 --- a/src/routes/berrydash/icon-marketplace/get.ts +++ b/src/routes/berrydash/icon-marketplace/get.ts @@ -3,7 +3,7 @@ import { getDatabaseConnection, jsonResponse } from '../../../lib/util' import { berryDashMarketplaceIcons, users } from '../../../lib/tables' import { desc, eq, inArray } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/icon-marketplace/icon/get.ts b/src/routes/berrydash/icon-marketplace/icon/get.ts index ee60875..07e65af 100644 --- a/src/routes/berrydash/icon-marketplace/icon/get.ts +++ b/src/routes/berrydash/icon-marketplace/icon/get.ts @@ -3,7 +3,7 @@ import { getDatabaseConnection, jsonResponse } from '../../../../lib/util' import { berryDashMarketplaceIcons, users } from '../../../../lib/tables' import { eq, inArray } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/icon-marketplace/post.ts b/src/routes/berrydash/icon-marketplace/post.ts index ea45af1..f42b330 100644 --- a/src/routes/berrydash/icon-marketplace/post.ts +++ b/src/routes/berrydash/icon-marketplace/post.ts @@ -32,7 +32,7 @@ const requiredKeys = [ 'currentIcons' ] -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/icon-marketplace/upload/post.ts b/src/routes/berrydash/icon-marketplace/upload/post.ts index 82fe839..a492b70 100644 --- a/src/routes/berrydash/icon-marketplace/upload/post.ts +++ b/src/routes/berrydash/icon-marketplace/upload/post.ts @@ -36,7 +36,7 @@ function exitBecauseInvalid ( ) } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/latest-version/get.ts b/src/routes/berrydash/latest-version/get.ts index 77d97ca..b2f5b50 100644 --- a/src/routes/berrydash/latest-version/get.ts +++ b/src/routes/berrydash/latest-version/get.ts @@ -2,7 +2,7 @@ import { launcherVersionManifest } from '../../../lib/tables' import { and, desc, eq } from 'drizzle-orm' import { getDatabaseConnection, jsonResponse } from '../../../lib/util' -export async function handler () { +export const handler = async () => { const dbResult = getDatabaseConnection(0) if (!dbResult) return jsonResponse({ error: 'Failed to connect to database' }, 500) diff --git a/src/routes/berrydash/leaderboard/get.ts b/src/routes/berrydash/leaderboard/get.ts index 2ac6691..6def316 100644 --- a/src/routes/berrydash/leaderboard/get.ts +++ b/src/routes/berrydash/leaderboard/get.ts @@ -3,7 +3,7 @@ import { getDatabaseConnection, jsonResponse } from '../../../lib/util' import { berryDashUserData, users } from '../../../lib/tables' import { eq } from 'drizzle-orm' -export async function handler (context: Context, type: number) { +export const handler = async (context: Context, type: number) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/profile/get.ts b/src/routes/berrydash/profile/get.ts index 85fbdce..7892b5a 100644 --- a/src/routes/berrydash/profile/get.ts +++ b/src/routes/berrydash/profile/get.ts @@ -7,7 +7,7 @@ import { import { berryDashUserData, users } from '../../../lib/tables' import { and, eq } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/profile/posts/delete.ts b/src/routes/berrydash/profile/posts/delete.ts index c0717ed..98a4a38 100644 --- a/src/routes/berrydash/profile/posts/delete.ts +++ b/src/routes/berrydash/profile/posts/delete.ts @@ -8,7 +8,7 @@ import { berryDashUserPosts } from '../../../../lib/tables' import { and, eq } from 'drizzle-orm' import { checkAuthorization } from '../../../../lib/auth' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/profile/posts/get.ts b/src/routes/berrydash/profile/posts/get.ts index edd9033..7a22c08 100644 --- a/src/routes/berrydash/profile/posts/get.ts +++ b/src/routes/berrydash/profile/posts/get.ts @@ -7,7 +7,7 @@ import { import { berryDashUserPosts, users } from '../../../../lib/tables' import { and, desc, eq } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/profile/posts/post.ts b/src/routes/berrydash/profile/posts/post.ts index c82d09e..1cea8c4 100644 --- a/src/routes/berrydash/profile/posts/post.ts +++ b/src/routes/berrydash/profile/posts/post.ts @@ -11,7 +11,7 @@ type Body = { content: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/profile/posts/put.ts b/src/routes/berrydash/profile/posts/put.ts index 6f9d5ce..8c0f53d 100644 --- a/src/routes/berrydash/profile/posts/put.ts +++ b/src/routes/berrydash/profile/posts/put.ts @@ -8,7 +8,7 @@ import { berryDashUserPosts } from '../../../../lib/tables' import { and, eq } from 'drizzle-orm' import { checkAuthorization } from '../../../../lib/auth' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/berrydash/splash-text/get.ts b/src/routes/berrydash/splash-text/get.ts index f0a8f65..baf887d 100644 --- a/src/routes/berrydash/splash-text/get.ts +++ b/src/routes/berrydash/splash-text/get.ts @@ -2,7 +2,7 @@ import { getDatabaseConnection } from '../../../lib/util' import { berryDashSplashTexts } from '../../../lib/tables' import { eq } from 'drizzle-orm' -export async function handler () { +export const handler = async () => { const dbInfo1 = getDatabaseConnection(1) if (!dbInfo1) diff --git a/src/routes/berrydash/splash-text/post.ts b/src/routes/berrydash/splash-text/post.ts index ee6fe80..36b1f40 100644 --- a/src/routes/berrydash/splash-text/post.ts +++ b/src/routes/berrydash/splash-text/post.ts @@ -15,7 +15,7 @@ type Body = { content: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) const dbInfo1 = getDatabaseConnection(1) diff --git a/src/routes/can-load-client.ts b/src/routes/can-load-client.ts index 75db5a9..7f8d44b 100644 --- a/src/routes/can-load-client.ts +++ b/src/routes/can-load-client.ts @@ -6,7 +6,7 @@ import { isLatestVersion } from '../lib/util' -export async function handler ({ request, set }: Context) { +export const handler = async ({ request, set }: Context) => { set.headers['Content-Type'] = 'text/plain' const requester = request.headers.get('Requester') ?? '0' const clientVersion = request.headers.get('ClientVersion') ?? '0' diff --git a/src/routes/get-verify-code.ts b/src/routes/get-verify-code.ts index 4049453..1eb52e7 100644 --- a/src/routes/get-verify-code.ts +++ b/src/routes/get-verify-code.ts @@ -13,7 +13,7 @@ type Body = { token: string } -export async function handler (context: Context) { +export const handler = async (context: Context) => { const body = context.body as Body const ip = getClientIp(context) const code = randomBytes(8).toString('hex') diff --git a/src/routes/launcher/download.ts b/src/routes/launcher/download.ts index 7aed1b1..c7be772 100644 --- a/src/routes/launcher/download.ts +++ b/src/routes/launcher/download.ts @@ -3,7 +3,7 @@ import { launcherVersionManifest } from '../../lib/tables' import { getDatabaseConnection } from '../../lib/util' import { eq, sql } from 'drizzle-orm' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbResult = getDatabaseConnection(0) if (!dbResult) return null const { connection, db } = dbResult diff --git a/src/routes/launcher/latest.ts b/src/routes/launcher/latest.ts index ec5f805..11e2d68 100644 --- a/src/routes/launcher/latest.ts +++ b/src/routes/launcher/latest.ts @@ -2,7 +2,7 @@ import { launcherUpdates } from '../../lib/tables' import { desc, eq } from 'drizzle-orm' import { getDatabaseConnection, jsonResponse } from '../../lib/util' -export async function handler () { +export const handler = async () => { const dbResult = getDatabaseConnection(0) if (!dbResult) return jsonResponse({ error: 'Failed to connect to database' }, 500) diff --git a/src/routes/launcher/loader/latest.ts b/src/routes/launcher/loader/latest.ts index 78a4c2c..c82db88 100644 --- a/src/routes/launcher/loader/latest.ts +++ b/src/routes/launcher/loader/latest.ts @@ -2,7 +2,7 @@ import { loaderUpdates } from '../../../lib/tables' import { desc, eq } from 'drizzle-orm' import { getDatabaseConnection, jsonResponse } from '../../../lib/util' -export async function handler () { +export const handler = async () => { const dbResult = getDatabaseConnection(0) if (!dbResult) return jsonResponse({ error: 'Failed to connect to database' }, 500) diff --git a/src/routes/launcher/loader/update-data.ts b/src/routes/launcher/loader/update-data.ts index e82adfc..7b7ff1e 100644 --- a/src/routes/launcher/loader/update-data.ts +++ b/src/routes/launcher/loader/update-data.ts @@ -3,7 +3,7 @@ import { desc, eq } from 'drizzle-orm' import { getDatabaseConnection, jsonResponse } from '../../../lib/util' import { Context } from 'elysia' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbResult = getDatabaseConnection(0) if (!dbResult) return jsonResponse({ error: 'Failed to connect to database' }, 500) diff --git a/src/routes/launcher/versions.ts b/src/routes/launcher/versions.ts index b116ff4..a682b62 100644 --- a/src/routes/launcher/versions.ts +++ b/src/routes/launcher/versions.ts @@ -3,7 +3,7 @@ import { asc, desc, eq } from 'drizzle-orm' import { getDatabaseConnection, jsonResponse } from '../../lib/util' import { Context } from 'elysia' -export async function handler (context: Context) { +export const handler = async (context: Context) => { const dbResult = getDatabaseConnection(0) if (!dbResult) return jsonResponse({ error: 'Failed to connect to database' }, 500)