newStaffLDB-API #48
@ -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;
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user