appelacomplete tag on completion

This commit is contained in:
2024-03-14 13:14:24 +00:00
parent 7aea356a52
commit 15f4f10a10
4 changed files with 105 additions and 75 deletions
@@ -1,7 +1,9 @@
import { hashAPIPath } from "../../../actions";
import {
getBlobs,
createCaseCompleteMessage,
getProgressBlobs,
downloadProgressFile,
createBlob,
} from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -25,8 +27,20 @@ ApiProxy.get(async (req, res) => {
"&tempcaseref=" +
tempCaseRef;
const blobProgress = await getProgressBlobs(
containerName,
tempCaseRef
).then((data) => {
return downloadProgressFile(containerName, data.path, tempCaseRef);
});
Object.assign(blobProgress, {
"appealComplete": true,
});
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createCaseCompleteMessage(containerName, tempCaseRef).then((data) => {
createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef);
return res.status(200).json(data);
});
// } else {