staffldb should be wrapped in ApiResponse before sending to client

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-09-12 20:48:34 +01:00
parent 843a6cad97
commit ad1afc10c7

View File

@ -78,7 +78,11 @@ async function arrDepBoardStaff(CRS) {
const _staffLdb = staffStationTransform(result);
console.log("Transformation Test Successful");
console.log(JSON.stringify(_staffLdb));
return _staffLdb;
return {
obStatus: 200,
obMsg: "success",
data: _staffLdb,
};
} catch (err) {
console.log("Transformation Test Failed: " + err);
}