updated to allow new appeals to work post ph merge
This commit is contained in:
+32
-16
@@ -1288,22 +1288,38 @@ export const getAllProgressBlobs = async (containerName) => {
|
||||
for await (const blob of containerClient.findBlobsByTags(
|
||||
"blobType='Appeal'"
|
||||
)) {
|
||||
blob.name.split("/")[1].indexOf("_appeal.json") > 0 &&
|
||||
blob.name.split("/")[1].indexOf("undefined") < 0 &&
|
||||
blobObj.push({
|
||||
"name": blob.name.split("/")[1],
|
||||
"path": blob.name,
|
||||
//"versionId": blob.versionId,
|
||||
"caseObj":
|
||||
blob.name.split("/")[0] +
|
||||
"/" +
|
||||
blob.name.split("/")[0] +
|
||||
"_case.json"
|
||||
// "isCurrentVersion": blob.isCurrentVersion,
|
||||
// "contentLength": blob.properties.contentLength,
|
||||
// "contentType": blob.contentType,
|
||||
// "lastModified": blob.properties.lastModified,
|
||||
});
|
||||
const namePart = blob.name.split("/")[1] ?? "";
|
||||
|
||||
// keep your existing name filters
|
||||
if (
|
||||
namePart.indexOf("_appeal.json") <= 0 ||
|
||||
namePart.indexOf("undefined") >= 0
|
||||
)
|
||||
continue;
|
||||
|
||||
// existence check (filters out soft-deleted / stale index hits)
|
||||
const blobClient = containerClient.getBlobClient(blob.name);
|
||||
try {
|
||||
await blobClient.getProperties();
|
||||
} catch (e) {
|
||||
// errors usually expose statusCode
|
||||
if (e?.statusCode === 404) continue;
|
||||
throw e;
|
||||
}
|
||||
blobObj.push({
|
||||
"name": blob.name.split("/")[1],
|
||||
"path": blob.name,
|
||||
//"versionId": blob.versionId,
|
||||
"caseObj":
|
||||
blob.name.split("/")[0] +
|
||||
"/" +
|
||||
blob.name.split("/")[0] +
|
||||
"_case.json"
|
||||
// "isCurrentVersion": blob.isCurrentVersion,
|
||||
// "contentLength": blob.properties.contentLength,
|
||||
// "contentType": blob.contentType,
|
||||
// "lastModified": blob.properties.lastModified,
|
||||
});
|
||||
}
|
||||
|
||||
// console.log(
|
||||
|
||||
Reference in New Issue
Block a user