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 = {
|
const version = {
|
||||||
api: ['/api/v1/','/api/v2'],
|
api: ['/api/v1/','/api/v2'],
|
||||||
app: '2023.6.8'
|
app: '2023.6.9'
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = version;
|
module.exports = version;
|
@ -8,8 +8,10 @@ async function getReasonCode(req, res, next) {
|
|||||||
const code = req.params.code;
|
const code = req.params.code;
|
||||||
if (code === 'all') {
|
if (code === 'all') {
|
||||||
res.json(await ldb.getReasonCodeList());
|
res.json(await ldb.getReasonCodeList());
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
res.json(await ldb.getReasonCode(code));
|
res.json(await ldb.getReasonCode(code));
|
||||||
|
next;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('ERROR', err.message);
|
console.error('ERROR', err.message);
|
||||||
err.status = 500;
|
err.status = 500;
|
||||||
|
Loading…
Reference in New Issue
Block a user