From b6fb9a33181b927c3274af1662e2ced2cd8f3d12 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 21 Jan 2026 16:22:38 -0700 Subject: [PATCH] bruh --- src/routes/berrydash/icon-marketplace/post.ts | 3 ++- src/routes/berrydash/profile/posts/delete.ts | 2 +- src/routes/berrydash/profile/posts/post.ts | 2 +- src/routes/berrydash/profile/posts/put.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/routes/berrydash/icon-marketplace/post.ts b/src/routes/berrydash/icon-marketplace/post.ts index 943c983..d1b8a2c 100644 --- a/src/routes/berrydash/icon-marketplace/post.ts +++ b/src/routes/berrydash/icon-marketplace/post.ts @@ -41,9 +41,10 @@ export async function handler (context: Context) { const { connection: connection0, db: db0 } = dbInfo0 const { connection: connection1, db: db1 } = dbInfo1 - const authorizationToken = context.headers.authorizationToken + const authorizationToken = context.headers.authorization const authResult = await checkAuthorization(authorizationToken as string, db1) if (!authResult.valid) { + connection0.end() connection1.end() return jsonResponse( { success: false, message: 'Unauthorized', data: null }, diff --git a/src/routes/berrydash/profile/posts/delete.ts b/src/routes/berrydash/profile/posts/delete.ts index a010e4d..142c33e 100644 --- a/src/routes/berrydash/profile/posts/delete.ts +++ b/src/routes/berrydash/profile/posts/delete.ts @@ -15,7 +15,7 @@ export async function handler (context: Context) { ) const { connection: connection1, db: db1 } = dbInfo1 - const authorizationToken = context.headers.authorizationToken + const authorizationToken = context.headers.authorization const authResult = await checkAuthorization(authorizationToken as string, db1) if (!authResult.valid) { connection1.end() diff --git a/src/routes/berrydash/profile/posts/post.ts b/src/routes/berrydash/profile/posts/post.ts index 619beea..81f4dd0 100644 --- a/src/routes/berrydash/profile/posts/post.ts +++ b/src/routes/berrydash/profile/posts/post.ts @@ -18,7 +18,7 @@ export async function handler (context: Context) { ) const { connection: connection1, db: db1 } = dbInfo1 - const authorizationToken = context.headers.authorizationToken + const authorizationToken = context.headers.authorization const authResult = await checkAuthorization(authorizationToken as string, db1) if (!authResult.valid) { connection1.end() diff --git a/src/routes/berrydash/profile/posts/put.ts b/src/routes/berrydash/profile/posts/put.ts index 0a78fd4..6cad21e 100644 --- a/src/routes/berrydash/profile/posts/put.ts +++ b/src/routes/berrydash/profile/posts/put.ts @@ -19,7 +19,7 @@ export async function handler (context: Context) { ) const { connection: connection1, db: db1 } = dbInfo1 - const authorizationToken = context.headers.authorizationToken + const authorizationToken = context.headers.authorization const authResult = await checkAuthorization(authorizationToken as string, db1) if (!authResult.valid) { connection1.end()