From b28df7656a0e58632be45acb6a8034a50ed802e7 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sat, 24 Jan 2026 12:16:36 -0700 Subject: [PATCH] Remove custom icon data from leaderboards response --- src/routes/berrydash/leaderboard/get.ts | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/routes/berrydash/leaderboard/get.ts b/src/routes/berrydash/leaderboard/get.ts index 3800f7f..7468cc0 100644 --- a/src/routes/berrydash/leaderboard/get.ts +++ b/src/routes/berrydash/leaderboard/get.ts @@ -1,10 +1,6 @@ import { Context } from 'elysia' import { getDatabaseConnection, jsonResponse } from '../../../lib/util' -import { - berryDashMarketplaceIcons, - berryDashUserData, - users -} from '../../../lib/tables' +import { berryDashUserData, users } from '../../../lib/tables' import { eq } from 'drizzle-orm' export async function handler (context: Context, type: number) { @@ -81,7 +77,6 @@ export async function handler (context: Context, type: number) { }) let mapped: Record = {} - let icons: Record = {} for (const row of completeUserList) { const savedata = row.saveData ? JSON.parse(row.saveData) : null if (!savedata) continue @@ -113,17 +108,6 @@ export async function handler (context: Context, type: number) { const customIcon = savedata.bird?.customIcon?.selected ?? null - if (customIcon && customIcon.length === 36 && !icons[customIcon]) { - const [iconRow] = await db1 - .select({ data: berryDashMarketplaceIcons.data }) - .from(berryDashMarketplaceIcons) - .where(eq(berryDashMarketplaceIcons.uuid, customIcon)) - .limit(1) - .execute() - - if (iconRow) icons[customIcon] = iconRow.data - } - mapped[row.id] = { username: row.username, value, @@ -141,6 +125,6 @@ export async function handler (context: Context, type: number) { return jsonResponse({ success: true, message: null, - data: { entries: mapped, customIcons: icons } + data: mapped }) }