From 11180cf942572dda98a95ffb3a787b35a0dc4ccd Mon Sep 17 00:00:00 2001 From: Chucks1093 <90640297+Chucks1093@users.noreply.github.com> Date: Wed, 2 Sep 2026 20:36:44 +0100 Subject: [PATCH] fix: remove duplicate UNPROCESSABLE_ENTITY key and malformed keyId declaration - error.constants.ts: UNPROCESSABLE_ENTITY appeared twice causing TS1117 - creator.routes.ts: malformed const keyId attached to return statement caused TS2451 redeclare block-scoped variable error --- src/constants/error.constants.ts | 1 - src/modules/creator/creator.routes.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/constants/error.constants.ts b/src/constants/error.constants.ts index d027e18..bfee94f 100644 --- a/src/constants/error.constants.ts +++ b/src/constants/error.constants.ts @@ -10,7 +10,6 @@ export const ErrorCode = { FORBIDDEN: 'FORBIDDEN', CONFLICT: 'CONFLICT', BAD_REQUEST: 'BAD_REQUEST', - UNPROCESSABLE_ENTITY: 'UNPROCESSABLE_ENTITY', INTERNAL_ERROR: 'INTERNAL_ERROR', RATE_LIMIT: 'RATE_LIMIT', PRISMA_ERROR: 'DATABASE_ERROR', diff --git a/src/modules/creator/creator.routes.ts b/src/modules/creator/creator.routes.ts index 3db4342..70a2a93 100644 --- a/src/modules/creator/creator.routes.ts +++ b/src/modules/creator/creator.routes.ts @@ -74,9 +74,7 @@ creatorsRouter.post( 'capBps must be between 100 and 2500' ); return; - } const keyId = Array.isArray(req.params.keyId) - ? req.params.keyId[0] - : req.params.keyId; + } const keyId = Array.isArray(req.params.keyId) ? req.params.keyId[0]