console log tidying

This commit is contained in:
2024-06-05 19:50:56 +01:00
parent 3284bce649
commit 2a6cd32452
44 changed files with 290 additions and 466 deletions
@@ -431,7 +431,7 @@ export default async function ApiProxy(req, res) {
item.NavigationProperty.toLowerCase() +
"_value";
// console.log(
//console.log(
// "\n==========================================\n",
// "basic search: " + queryUrl,
// "\n\n",
@@ -458,7 +458,7 @@ export default async function ApiProxy(req, res) {
item.NavigationProperty.toLowerCase() +
"_value";
// console.log(
//console.log(
// "\n==========================================\n",
// "basic search: " + queryUrl,
// "\n\n",
+7 -7
View File
@@ -50,13 +50,13 @@ export default async function ApiProxy(req, res) {
const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList);
console.log(
'$..[?(@.name="' + lpaid + '")]',
lpaList,
lpaid,
"LPAGUID=",
lpaGUID
);
//console.log(
// '$..[?(@.name="' + lpaid + '")]',
// lpaList,
// lpaid,
// "LPAGUID=",
// lpaGUID
// );
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_pinswg_associatedlpa_value eq " +
+1 -1
View File
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
contactid +
")?$select=firstname, lastname, emailaddress1, telephone1, company, address1_line1,address1_line2,address1_city, address1_county,address1_postalcode,pinswg_typeofinvolvement,pinswg_contact_associatedlpa,pinswg_preferredlanguage&$count=true";
// console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
//console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
var apiResponse =
contactid.length > 0
@@ -19,8 +19,8 @@ ApiProxy.get(async (req, res) => {
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
var checkquerypath =
"/api/file/createappealcompletemessage_api?container=" +
containerName +
@@ -22,8 +22,8 @@ ApiProxy.get(async (req, res) => {
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
var token = await getToken();
@@ -15,8 +15,8 @@ ApiProxy.get(async (req, res) => {
var tempCaseRef = req.query.tempcaseref;
var filename = req.query.repid;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createRepCompleteMessage(containerName, tempCaseRef, filename).then(
@@ -21,8 +21,8 @@ ApiProxy.get(async (req, res) => {
"&blobname=" +
blobName;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlob(
+2 -2
View File
@@ -21,8 +21,8 @@ ApiProxy.get(async (req, res) => {
"&blobname=" +
blobName;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlob(
+2 -2
View File
@@ -19,8 +19,8 @@ ApiProxy.get(async (req, res) => {
"&casefolderID=" +
casefolderID;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlobCase(containerName, casefolderID).then((data) => {
+2 -2
View File
@@ -24,8 +24,8 @@ ApiProxy.get(async (req, res) => {
casefolderID = casefolderID + "/" + repfile;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlobRep(containerName, casefolderID).then((data) => {
+1 -1
View File
@@ -105,7 +105,7 @@ import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
// const ApiProxy = nextConnect();
//const ApiProxy = nextConnect();
// ApiProxy.use(middleware);
// ApiProxy.post(async (req, res) => {
+3 -3
View File
@@ -100,7 +100,7 @@ import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
import { consoleLogger } from "../../../actions";
// const ApiProxy = nextConnect();
//const ApiProxy = nextConnect();
// ApiProxy.use(middleware);
// ApiProxy.post(async (req, res) => {
@@ -131,7 +131,7 @@ export default async function handler(req, res) {
var checkquerypath = "/api/file/generatepdf";
//console.log("-------", checkHash);
// console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
//console.log(casefolderID, caseRef);
// Create Document Component
@@ -215,7 +215,7 @@ export default async function handler(req, res) {
// code block
}
// console.log(
//console.log(
// "///////////////////////////////////\n file created: \n" +
// process.cwd() +
// `tmp/${reqBodyobj.repfile_name}.pdf` +
@@ -17,12 +17,12 @@ ApiProxy.get(async (req, res) => {
var checkquerypath =
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
console.log(
"///////////////////////\ngetawaitingsubmissionblob url :",
req.url,
"\n///////////////////////\n"
);
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(
// "///////////////////////\ngetawaitingsubmissionblob url :",
// req.url,
// "\n///////////////////////\n"
// );
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
+2 -2
View File
@@ -49,8 +49,8 @@ ApiProxy.get(async (req, res) => {
"&casefolderID=" +
casefolderID;
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await getBlobs(containerName, casefolderID).then((data) => {
+1 -1
View File
@@ -22,7 +22,7 @@ ApiProxy.get(async (req, res) => {
casefolderID;
//console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
const blobObj = await getProgressBlobs(containerName, casefolderID)
+16 -16
View File
@@ -48,24 +48,24 @@ ApiProxy.get(async (req, res) => {
var checkHash = req.query.hash;
var checkquerypath = "/api/file/getrepsblob?container=" + containerName;
// console.log("-----", casefolderID);
// console.log("-----", req.query);
// console.log("-----", checkquerypath);
// console.log("-----", hashAPIPath(checkquerypath));
// console.log("-----", checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log("-----", casefolderID);
//console.log("-----", req.query);
//console.log("-----", checkquerypath);
//console.log("-----", hashAPIPath(checkquerypath));
//console.log("-----", checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
const blobObj = await getRepsBlobs(containerName, casefolderID)
.then(async (data) => {
console.log(
"\n////////////////////////////\n getRepsBlobs:",
data
);
//console.log(
// "\n////////////////////////////\n getRepsBlobs:",
// data
// );
return data;
})
.then(async (data) => {
console.log("\n////////////////////////////\n now here:", data);
//console.log("\n////////////////////////////\n now here:", data);
let result = await downloadAllRepsFiles(containerName, data);
@@ -75,11 +75,11 @@ ApiProxy.get(async (req, res) => {
.json(result);
})
.catch((error) => {
console.log(
"///////////////////////\ngetRepsFromBlob api in api route response: " +
error +
"\n///////////////////////\n"
);
//console.log(
// "///////////////////////\ngetRepsFromBlob api in api route response: " +
// error +
// "\n///////////////////////\n"
// );
//console.log("API call error", error);
console.log(consoleLogger(error));
+2 -2
View File
@@ -17,8 +17,8 @@ ApiProxy.get(async (req, res) => {
var checkHash = req.query.hash;
var checkquerypath = "/api/file/setupcontainer?ident=" + containerName;
// console.log(checkquerypath, hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
//console.log(checkquerypath, hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createContainer(containerName)
+5 -5
View File
@@ -12,9 +12,9 @@ ApiProxy.use(middleware);
ApiProxy.post(async (req, res) => {
var checkHash = req.query.hash;
// console.log(JSON.stringify(req.body));
// console.log(JSON.stringify(req.body.appealData));
// console.log(req.files);
//console.log(JSON.stringify(req.body));
//console.log(JSON.stringify(req.body.appealData));
//console.log(req.files);
const appealData = req.body.appealData;
const containerID = req.body.containerID[0];
@@ -25,8 +25,8 @@ ApiProxy.post(async (req, res) => {
// var checkquerypath = "/api/file/upload";
// console.log(hashAPIPath(checkquerypath), checkHash);
// console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
//console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
// if (hashAPIPath(checkquerypath) == "?hash=" + checkHash) {
//createContainer(containerID).then((containerName) => {