From 5ed07e394846e1f71dd25ede36f23c4c6120a823 Mon Sep 17 00:00:00 2001 From: armandobelardo Date: Thu, 12 Sep 2024 16:49:46 -0400 Subject: [PATCH] fix(fdr): parse numeric path parameter manually --- .../src/controllers/generators/getGeneratorsCliController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/fdr/src/controllers/generators/getGeneratorsCliController.ts b/servers/fdr/src/controllers/generators/getGeneratorsCliController.ts index 5c63a736ff..84e2e46a3c 100644 --- a/servers/fdr/src/controllers/generators/getGeneratorsCliController.ts +++ b/servers/fdr/src/controllers/generators/getGeneratorsCliController.ts @@ -25,9 +25,10 @@ export function getGeneratorsCliController(app: FdrApplication): CliService { ); }, getMinCliForIr: async (req, res) => { - const maybeRelease = await app.dao.cliVersions().getMinCliForIr({ irVersion: req.params.irVersion }); + const irVersion = Number(req.params.irVersion); + const maybeRelease = await app.dao.cliVersions().getMinCliForIr({ irVersion }); if (!maybeRelease) { - throw new NoValidCliForIrError({ providedVersion: req.params.irVersion }); + throw new NoValidCliForIrError({ providedVersion: irVersion }); } return res.send(maybeRelease); },