From 011da17f0cee7b98f5708e8fc587bc695ddfee5a Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 21 Sep 2023 20:06:51 +0100 Subject: [PATCH] Adjust status message code Signed-off-by: Fred Boniface --- src/configs/errorCodes.configs.ts | 2 ++ src/services/ldb.services.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/configs/errorCodes.configs.ts b/src/configs/errorCodes.configs.ts index d35f281..be9704c 100644 --- a/src/configs/errorCodes.configs.ts +++ b/src/configs/errorCodes.configs.ts @@ -16,7 +16,9 @@ export const statusCodes = { export const msgCodes = new Map ([ ["LOC_NOT_FOUND", "Location not found. If you are sure that the location exists, there may be a fault with the data provider."], + ["USR_NOT_FOUND", "User is not registered, consider regeristering for access to this resource"], ["AUTH_ERR", "Authentication Error"], + ["OK", "OK"] ]) module.exports = statusCodes; diff --git a/src/services/ldb.services.js b/src/services/ldb.services.js index 351f639..8903356 100644 --- a/src/services/ldb.services.js +++ b/src/services/ldb.services.js @@ -80,8 +80,8 @@ async function arrDepBoardStaff(CRS) { console.log("Transformation Test Successful"); console.log(JSON.stringify(_staffLdb)); return { - obStatus: 200, - obMsg: "success", + obStatus: "OK", + obMsg: msgCodes.get("OK"), data: _staffLdb, }; } catch (err) {