Added additional precuations for users that do not exist and verified auth access.

This commit is contained in:
Patrick Fic
2020-10-19 16:26:51 -07:00
parent 64f6d549d1
commit 0749404d59
10 changed files with 124 additions and 32 deletions

View File

@@ -29,9 +29,12 @@ async function DecodeEstimate(filePath) {
returnValue = { ERROR: "Vehicle mileage is less than 20,000kms." };
} else if (!accepted_ins_co.includes(job.INS_CO_NM)) {
returnValue = {
ERROR: `Insurance Company Name is not valid for RPS. (${job.INS_CO_NM})`,
ERROR: `Insurance Company Name is not valid for RPS. (${
job.INS_CO_NM || "No name set"
})`,
};
} else if (!job.clm_no) {
} else if (!job.CLM_NO) {
log.info("Job ignored. No claim #. " + job.clm_no);
returnValue = {
ERROR: `An unique claim number must be set for all jobs sent to RPS.`,
};