Adjust status message code

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-09-21 20:06:51 +01:00
parent d95ed436b8
commit 011da17f0c
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,9 @@ export const statusCodes = {
export const msgCodes = new Map <string, string>([ export const msgCodes = new Map <string, string>([
["LOC_NOT_FOUND", "Location not found. If you are sure that the location exists, there may be a fault with the data provider."], ["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"], ["AUTH_ERR", "Authentication Error"],
["OK", "OK"]
]) ])
module.exports = statusCodes; module.exports = statusCodes;

View File

@ -80,8 +80,8 @@ async function arrDepBoardStaff(CRS) {
console.log("Transformation Test Successful"); console.log("Transformation Test Successful");
console.log(JSON.stringify(_staffLdb)); console.log(JSON.stringify(_staffLdb));
return { return {
obStatus: 200, obStatus: "OK",
obMsg: "success", obMsg: msgCodes.get("OK"),
data: _staffLdb, data: _staffLdb,
}; };
} catch (err) { } catch (err) {