TASK22057: phase18 additional consolidation slices

This commit is contained in:
2026-03-14 06:52:17 +00:00
parent daa38d6459
commit fffe1d19dd
15 changed files with 460 additions and 66 deletions
+13 -2
View File
@@ -36,6 +36,19 @@ export default async function ApiProxy(req, res) {
var token = await getToken();
var tempCaseRef = getTempCaseRef();
if (
typeof contactid === "undefined" ||
contactid.length === 0 ||
typeof appealTypeId === "undefined" ||
appealTypeId.length === 0 ||
typeof containerName === "undefined" ||
containerName.length === 0 ||
typeof lpaID === "undefined" ||
lpaID.length === 0
) {
return res.status(400).json();
}
var data = {
"title": tempCaseRef,
"ticketnumber": tempCaseRef,
@@ -53,8 +66,6 @@ export default async function ApiProxy(req, res) {
delete newData.lpaTypes;
delete newData.appealTypes;
console.log("/////Create Case:\n", newData, "\n//////////////");
var newAppealObj = {
"pinswg_name": tempCaseRef,
"pinswg_appealcasetype": appealTypeId,
@@ -38,14 +38,11 @@ ApiProxy.get(async (req, res) => {
return res.status(400).json();
}
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlob(
containerName,
casefolderID + "/files/" + blobName
).then((data) => {
await deleteBlob(containerName, casefolderID + "/files/" + blobName).then(
(data) => {
return res.status(200).json({ data: data });
});
}
}
);
});
export const config = {
+4 -7
View File
@@ -38,14 +38,11 @@ ApiProxy.get(async (req, res) => {
return res.status(400).json();
}
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await deleteBlob(
containerName,
casefolderID + "/files/" + blobName
).then((data) => {
await deleteBlob(containerName, casefolderID + "/files/" + blobName).then(
(data) => {
return res.status(200).json({ data: data });
});
}
}
);
});
export const config = {
+2 -3
View File
@@ -42,7 +42,7 @@ export default async function handler(req, res) {
const tags = {
containerid: json.containerID,
caseID: json.ticketnumber,
blobType: "Representation",
blobType: "Representation"
};
// Convert back to string
@@ -53,11 +53,10 @@ export default async function handler(req, res) {
updatedContent,
Buffer.byteLength(updatedContent),
{
blobHTTPHeaders: { blobContentType: "application/json" },
blobHTTPHeaders: { blobContentType: "application/json" }
}
);
console.log("the tags:", tags);
const withTags = await blockBlobClient.setTags(tags);
const withMeta = await blockBlobClient.setMetadata(tags);
+11 -13
View File
@@ -65,19 +65,17 @@ ApiProxy.get(async (req, res) => {
return res.status(400).json();
}
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
casefolderID.split("/").length > 1
? await getRepsFilesBlobs(
containerName,
casefolderID.split("/")[0],
casefolderID.split("/")[1]
).then((data) => {
return res.status(200).json({ "value": [data] });
})
: await getBlobs(containerName, casefolderID).then((data) => {
return res.status(200).json({ "value": [data] });
});
}
casefolderID.split("/").length > 1
? await getRepsFilesBlobs(
containerName,
casefolderID.split("/")[0],
casefolderID.split("/")[1]
).then((data) => {
return res.status(200).json({ "value": [data] });
})
: await getBlobs(containerName, casefolderID).then((data) => {
return res.status(200).json({ "value": [data] });
});
});
export const config = {
+7 -13
View File
@@ -37,19 +37,13 @@ ApiProxy.get(async (req, res) => {
return res.status(400).json();
}
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
const blobObj = await getProgressBlobs(containerName, casefolderID)
.then((data) => {
return downloadProgressFile(
containerName,
data.path,
casefolderID
);
})
.then((data) => {
return res.status(200).json(data);
});
}
await getProgressBlobs(containerName, casefolderID)
.then((data) => {
return downloadProgressFile(containerName, data.path, casefolderID);
})
.then((data) => {
return res.status(200).json(data);
});
});
export const config = {
+13
View File
@@ -29,6 +29,19 @@ export default async function ApiProxy(req, res) {
var updateFormCollection = req.query.updateFormCollection;
var queryUrl = updateFormCollection + "(" + appealObj + ")";
if (
typeof updateFormCollection === "undefined" ||
updateFormCollection.length === 0 ||
typeof appealObj === "undefined" ||
appealObj.length === 0 ||
typeof incidentID === "undefined" ||
incidentID.length === 0 ||
typeof req.body === "undefined" ||
req.body === null
) {
return res.status(400).json();
}
var token = await getToken();
var config = {