Fix reasonCode endpoint
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
34d00ad16f
commit
199a1760b7
@ -1,6 +1,6 @@
|
||||
const version = {
|
||||
api: ['/api/v1/','/api/v2'],
|
||||
app: '2023.6.8'
|
||||
app: '2023.6.9'
|
||||
};
|
||||
|
||||
module.exports = version;
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user