Fix reasonCode endpoint

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-06-18 21:28:25 +01:00
parent 34d00ad16f
commit 199a1760b7
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
const version = {
api: ['/api/v1/','/api/v2'],
app: '2023.6.8'
app: '2023.6.9'
};
module.exports = version;

View File

@ -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;