From f02a5760f19949caa6efa3594bfdcb8315ef3dbb Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 11 Feb 2026 13:33:59 -0700 Subject: [PATCH] I guess that isn't needed --- src/routes/berrydash/account/get.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/routes/berrydash/account/get.ts b/src/routes/berrydash/account/get.ts index e103ef3..cb35cde 100644 --- a/src/routes/berrydash/account/get.ts +++ b/src/routes/berrydash/account/get.ts @@ -20,22 +20,9 @@ export const handler = async (context: Context) => { const { connection: connection0, db: db0 } = dbInfo0 const { connection: connection1, db: db1 } = dbInfo1 - const usernameToSearch = context.query.username + const usernameToSearch = context.query.username ?? '' const idToSearch = Number(context.query.id ?? '0') const exactSearch = context.query.exact ?? ''.toLowerCase() == 'true' - if (!usernameToSearch && !(idToSearch > 0 && exactSearch)) { - connection0.end() - connection1.end() - return jsonResponse( - { - success: false, - message: - 'Either `username`, or `id` and `exact=true` params are required', - data: null - }, - 400 - ) - } const userRows = await db0 .select({