From 199a1760b7b90541a145ac49b966a2505d2b1714 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 18 Jun 2023 21:28:25 +0100 Subject: [PATCH] Fix reasonCode endpoint Signed-off-by: Fred Boniface --- src/configs/version.configs.js | 2 +- src/controllers/ref.controllers.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/configs/version.configs.js b/src/configs/version.configs.js index 9d909a9..7956bc7 100644 --- a/src/configs/version.configs.js +++ b/src/configs/version.configs.js @@ -1,6 +1,6 @@ const version = { api: ['/api/v1/','/api/v2'], - app: '2023.6.8' + app: '2023.6.9' }; module.exports = version; \ No newline at end of file diff --git a/src/controllers/ref.controllers.js b/src/controllers/ref.controllers.js index 2598fc5..e7c6a4b 100644 --- a/src/controllers/ref.controllers.js +++ b/src/controllers/ref.controllers.js @@ -8,8 +8,10 @@ async function getReasonCode(req, res, next) { const code = req.params.code; if (code === 'all') { res.json(await ldb.getReasonCodeList()); + next; } res.json(await ldb.getReasonCode(code)); + next; } catch (err) { console.error('ERROR', err.message); err.status = 500;