diff --git a/src/modules/whitelist/whitelist.controllers.ts b/src/modules/whitelist/whitelist.controllers.ts index 3dc23ac6..af31ed76 100644 --- a/src/modules/whitelist/whitelist.controllers.ts +++ b/src/modules/whitelist/whitelist.controllers.ts @@ -32,7 +32,7 @@ export const httpGetWhitelistStatus: AsyncController = async ( ) => { try { const { keyId } = req.params as { keyId: string }; - const { wallet } = req.query; + const wallet = req.params.wallet ?? req.query.wallet; if (!keyId) { return sendValidationError(res, 'Missing required parameters', [ diff --git a/src/modules/whitelist/whitelist.routes.ts b/src/modules/whitelist/whitelist.routes.ts index 6b84bb45..379d3069 100644 --- a/src/modules/whitelist/whitelist.routes.ts +++ b/src/modules/whitelist/whitelist.routes.ts @@ -9,6 +9,12 @@ import { const whitelistRouter = Router(); +/** + * GET /keys/:keyId/whitelist/:wallet + * Public endpoint - returns whitelist and wallet approval status. + */ +whitelistRouter.get('/:keyId/whitelist/:wallet', httpGetWhitelistStatus); + /** * GET /keys/:keyId/whitelist?wallet=
* Public endpoint - no authentication required