adjusted ordering of sequence to complete

This commit is contained in:
2024-05-02 10:37:28 +01:00
parent eb08e67546
commit 0f3d20ca80
6 changed files with 67 additions and 31 deletions
@@ -27,28 +27,48 @@ ApiProxy.get(async (req, res) => {
"&tempcaseref=" +
tempCaseRef;
// const blobProgress = await getProgressBlobs(
// containerName,
// tempCaseRef
// ).then((data) => {
// return downloadProgressFile(containerName, data.path, tempCaseRef);
// });
const blobProgress = await getProgressBlobs(
containerName,
tempCaseRef
).then((data) => {
return downloadProgressFile(containerName, data.path, tempCaseRef);
});
// Object.assign(blobProgress, {
// "appealComplete": true,
// });
Object.assign(blobProgress, {
"appealComplete": true,
});
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createCaseCompleteMessage(containerName, tempCaseRef)
.then((data) => {
//createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef);
await createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef)
.then(() => {
createCaseCompleteMessage(containerName, tempCaseRef);
return res.status(200).json(data);
})
.catch((error) => {
//console.log(error);
console.log(
"///////////////////////\n createCaseCompleteMessage:",
error,
"///////////////////////\n"
);
return res.status(400).json(error);
});
// await createCaseCompleteMessage(containerName, tempCaseRef)
// .then((data) => {
// console.log(data);
// createBlob(
// JSON.stringify(blobProgress),
// containerName,
// tempCaseRef
// );
// return res.status(200).json(data);
// })
// .catch((error) => {
// console.log(error);
// return res.status(400).json(error);
// });
});
export const config = {
+2 -2
View File
@@ -186,8 +186,8 @@ export default async function handler(req, res) {
blobProgress.pinswg_name
).then((data) => {
console.log(
"///////////////////////////////////\nfile created: " + data,
`/files/${blobProgress.pinswg_name}.pdf`,
"///////////////////////////////////\nfile created: " +
`/files/${blobProgress.pinswg_name}.pdf`,
"\n/////////////////////////"
);
return res.status(200).json({