console log cleanup
This commit is contained in:
+26
-18
@@ -431,11 +431,11 @@ export const downloadAllProgressFiles = async (
|
|||||||
containerName,
|
containerName,
|
||||||
progressBlobObj
|
progressBlobObj
|
||||||
) => {
|
) => {
|
||||||
console.log(
|
// console.log(
|
||||||
"/////////////////////////\n downloading files: " +
|
// "/////////////////////////\n downloading files: " +
|
||||||
JSON.stringify(progressBlobObj) +
|
// JSON.stringify(progressBlobObj) +
|
||||||
"\n/////////////////////////\n"
|
// "\n/////////////////////////\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
const containerToken = await createContainerSas(containerName);
|
const containerToken = await createContainerSas(containerName);
|
||||||
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
@@ -449,7 +449,7 @@ export const downloadAllProgressFiles = async (
|
|||||||
let blobCount = 0;
|
let blobCount = 0;
|
||||||
|
|
||||||
for (const prop in progressBlobObj) {
|
for (const prop in progressBlobObj) {
|
||||||
console.log(`Progress - ${prop}: ${progressBlobObj[prop].path}`);
|
//console.log(`Progress - ${prop}: ${progressBlobObj[prop].path}`);
|
||||||
blobClient = containerClient.getBlobClient(progressBlobObj[prop].path);
|
blobClient = containerClient.getBlobClient(progressBlobObj[prop].path);
|
||||||
downloadedBlob = await blobClient.download(0);
|
downloadedBlob = await blobClient.download(0);
|
||||||
downloaded =
|
downloaded =
|
||||||
@@ -462,7 +462,7 @@ export const downloadAllProgressFiles = async (
|
|||||||
downloaded = downloaded.substring(0, downloaded.length - 1);
|
downloaded = downloaded.substring(0, downloaded.length - 1);
|
||||||
|
|
||||||
for (const prop in progressBlobObj) {
|
for (const prop in progressBlobObj) {
|
||||||
console.log(`Cases - ${prop}: ${progressBlobObj[prop].caseObj}`);
|
//console.log(`Cases - ${prop}: ${progressBlobObj[prop].caseObj}`);
|
||||||
blobClient = containerClient.getBlobClient(
|
blobClient = containerClient.getBlobClient(
|
||||||
progressBlobObj[prop].caseObj
|
progressBlobObj[prop].caseObj
|
||||||
);
|
);
|
||||||
@@ -487,11 +487,11 @@ export const downloadAllProgressFiles = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
||||||
console.log(
|
// console.log(
|
||||||
"/////////////////////////\n downloading files: " +
|
// "/////////////////////////\n downloading files: " +
|
||||||
JSON.stringify(repsBlobObj) +
|
// JSON.stringify(repsBlobObj) +
|
||||||
"\n/////////////////////////\n"
|
// "\n/////////////////////////\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
const containerToken = await createContainerSas(containerName);
|
const containerToken = await createContainerSas(containerName);
|
||||||
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
@@ -506,7 +506,7 @@ export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
|||||||
let blobCount = 0;
|
let blobCount = 0;
|
||||||
|
|
||||||
for (const prop in repsBlobObj) {
|
for (const prop in repsBlobObj) {
|
||||||
console.log(`Progress - ${prop}: ${repsBlobObj[prop].name}`);
|
//console.log(`Progress - ${prop}: ${repsBlobObj[prop].name}`);
|
||||||
blobClient = containerClient.getBlobClient(repsBlobObj[prop].name);
|
blobClient = containerClient.getBlobClient(repsBlobObj[prop].name);
|
||||||
downloadedBlob = await blobClient.download(0);
|
downloadedBlob = await blobClient.download(0);
|
||||||
let repBlobObj = await streamToBuffer(
|
let repBlobObj = await streamToBuffer(
|
||||||
@@ -578,13 +578,17 @@ export const getProgressBlobs = async (containerName, caseReference) => {
|
|||||||
blobCount++;
|
blobCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("this is the caasefolder:", caseReference, blobCount);
|
console.log(
|
||||||
|
"this is the casefolder and blobcount:",
|
||||||
|
caseReference,
|
||||||
|
blobCount
|
||||||
|
);
|
||||||
|
|
||||||
let blobObj = [];
|
let blobObj = [];
|
||||||
for await (const blob of containerClient.listBlobsFlat({
|
for await (const blob of containerClient.listBlobsFlat({
|
||||||
prefix: caseReference + "/" + caseReference + "_appeal.json",
|
prefix: caseReference + "/" + caseReference + "_appeal.json",
|
||||||
})) {
|
})) {
|
||||||
console.log("in here");
|
console.log("getProgressBlobs in here");
|
||||||
blobObj.push({
|
blobObj.push({
|
||||||
"name": blob.name.split("/")[1],
|
"name": blob.name.split("/")[1],
|
||||||
"path": blob.name,
|
"path": blob.name,
|
||||||
@@ -676,14 +680,18 @@ export const getRepslobs = async (containerName, caseReference) => {
|
|||||||
blobCount++;
|
blobCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("this is the caasefolder:", caseReference, blobCount);
|
console.log(
|
||||||
|
"this is the casefolder and blobcount:",
|
||||||
|
caseReference,
|
||||||
|
blobCount
|
||||||
|
);
|
||||||
|
|
||||||
let blobObj = [];
|
let blobObj = [];
|
||||||
for await (const blob of containerClient.findBlobsByTags(
|
for await (const blob of containerClient.findBlobsByTags(
|
||||||
"blobType='Representation'"
|
"blobType='Representation'"
|
||||||
)) {
|
)) {
|
||||||
console.log("in here");
|
// console.log("getRepslobs in here");
|
||||||
console.log(blob);
|
// console.log(blob);
|
||||||
blobObj.push(blob);
|
blobObj.push(blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+59
-7
@@ -770,11 +770,11 @@ export const getAwaitingSubmission = (loggedInUserId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getAwaitingSubmissionFromBlob = (containerName) => {
|
export const getAwaitingSubmissionFromBlob = (containerName) => {
|
||||||
console.log(
|
// console.log(
|
||||||
"///////////////////////\ngetAwaitingSubmissionFromBlob: " +
|
// "///////////////////////\ngetAwaitingSubmissionFromBlob: " +
|
||||||
containerName +
|
// containerName +
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
@@ -821,7 +821,7 @@ export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
|
|||||||
BASE_URL +
|
BASE_URL +
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
"/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
containerName +
|
containerName +
|
||||||
+hashAPIPath(
|
hashAPIPath(
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
"/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
containerName
|
containerName
|
||||||
)
|
)
|
||||||
@@ -999,7 +999,17 @@ export const createNewCaseBlob = (
|
|||||||
"&contactid=" +
|
"&contactid=" +
|
||||||
contactid +
|
contactid +
|
||||||
"&containername=" +
|
"&containername=" +
|
||||||
containerName;
|
containerName +
|
||||||
|
hashAPIPath(
|
||||||
|
"/api/file/createcase_api?appealTypeId=" +
|
||||||
|
appealTypeId +
|
||||||
|
"&lpaID=" +
|
||||||
|
lpaID +
|
||||||
|
"&contactid=" +
|
||||||
|
contactid +
|
||||||
|
"&containername=" +
|
||||||
|
containerName
|
||||||
|
);
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -1497,6 +1507,22 @@ export const getPortalLogin = (emailAddress) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const createContainerProxy = (containerName) => {
|
||||||
|
var queryUrl =
|
||||||
|
"/api/file/setupcontainer?ident=" +
|
||||||
|
containerName +
|
||||||
|
hashAPIPath("/api/file/setupcontainer?ident=" + containerName);
|
||||||
|
|
||||||
|
return axios
|
||||||
|
.get(BASE_URL + queryUrl)
|
||||||
|
.then((res) => res.data)
|
||||||
|
.catch((error) => {
|
||||||
|
//console.log(consoleLogger(error));
|
||||||
|
console.log("thiserror", error);
|
||||||
|
return JSON.stringify(error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const sendCaseCompleteMessage = async (containerID, caseReference) => {
|
export const sendCaseCompleteMessage = async (containerID, caseReference) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/file/createappealcompletemessage_api?container=" +
|
"/api/file/createappealcompletemessage_api?container=" +
|
||||||
@@ -1520,6 +1546,32 @@ export const sendCaseCompleteMessage = async (containerID, caseReference) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const sendCaseCompleteMessageProxy = async (
|
||||||
|
containerID,
|
||||||
|
caseReference
|
||||||
|
) => {
|
||||||
|
var queryUrl =
|
||||||
|
"/api/file/createappealcompletemessageproxy_api?container=" +
|
||||||
|
containerID +
|
||||||
|
"&tempcaseref=" +
|
||||||
|
caseReference;
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
method: "get",
|
||||||
|
url: queryUrl,
|
||||||
|
};
|
||||||
|
|
||||||
|
//console.log(data);
|
||||||
|
|
||||||
|
return axios(config)
|
||||||
|
.then((res) => {
|
||||||
|
return res.data;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
//console.log("API call error", error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const sendRepCompleteMessage = async (containerID, caseReference) => {
|
export const sendRepCompleteMessage = async (containerID, caseReference) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/file/createrepcompletemessage_api?container=" +
|
"/api/file/createrepcompletemessage_api?container=" +
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
azureHeadersPaged(token.access_token)
|
azureHeadersPaged(token.access_token)
|
||||||
)
|
)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
console.log(data);
|
//console.log(data);
|
||||||
res.status(200).json(data);
|
res.status(200).json(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ ApiProxy.get(async (req, res) => {
|
|||||||
var checkquerypath =
|
var checkquerypath =
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
|
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
"///////////////////////\ngetawaitingsubmissionblob url :",
|
// "///////////////////////\ngetawaitingsubmissionblob url :",
|
||||||
req.url,
|
// req.url,
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
// console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
let loggedInUser = cookies.pinsUser;
|
let loggedInUser = cookies.pinsUser;
|
||||||
|
|
||||||
let thisSession = await getSession(ctx);
|
let thisSession = await getSession(ctx);
|
||||||
console.log("nextAuth Session:", thisSession);
|
//console.log("nextAuth Session:", thisSession);
|
||||||
|
|
||||||
let loggedInUserIdent = thisSession.user.id;
|
let loggedInUserIdent = thisSession.user.id;
|
||||||
let loggedInUserEmail = thisSession.user.email;
|
let loggedInUserEmail = thisSession.user.email;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
console.log("/newappeal - cookies ", cookies);
|
console.log("/newappeal - cookies ", cookies);
|
||||||
let thisSession = await getSession(ctx);
|
let thisSession = await getSession(ctx);
|
||||||
console.log("nextAuth Session:", thisSession);
|
//console.log("nextAuth Session:", thisSession);
|
||||||
|
|
||||||
if (_.has(thisSession, "user") == false) {
|
if (_.has(thisSession, "user") == false) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user