TASK22269: extract touched azurestorage case object path helper
This commit is contained in:
@@ -84,6 +84,10 @@ const buildGetBlobListQueryPath = ({ containerName, casefolderID }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const buildCaseObjectPath = (casefolderID) => {
|
||||||
|
return casefolderID + "/" + casefolderID + "_case.json";
|
||||||
|
};
|
||||||
|
|
||||||
const buildHashMetadataPaths = ({ containerName, casefolderID, blobname }) => {
|
const buildHashMetadataPaths = ({ containerName, casefolderID, blobname }) => {
|
||||||
return {
|
return {
|
||||||
"hashedfilepath": hashAPIPath(
|
"hashedfilepath": hashAPIPath(
|
||||||
@@ -275,7 +279,7 @@ export const getBlobs = async (containerName, casefolderID) => {
|
|||||||
"path": blob.name,
|
"path": blob.name,
|
||||||
"documentType": getDocumentTypeFromFilename(fileName),
|
"documentType": getDocumentTypeFromFilename(fileName),
|
||||||
"versionId": blob.versionId,
|
"versionId": blob.versionId,
|
||||||
"caseObj": casefolderID + "/" + casefolderID + "_case.json",
|
"caseObj": buildCaseObjectPath(casefolderID),
|
||||||
"isCurrentVersion": blob.isCurrentVersion,
|
"isCurrentVersion": blob.isCurrentVersion,
|
||||||
"contentLength": blob.properties.contentLength,
|
"contentLength": blob.properties.contentLength,
|
||||||
"size": blob.properties.contentLength,
|
"size": blob.properties.contentLength,
|
||||||
@@ -1297,7 +1301,7 @@ export const getProgressBlobs = async (containerName, caseReference) => {
|
|||||||
"name": appealBlobName,
|
"name": appealBlobName,
|
||||||
"path": blob.name,
|
"path": blob.name,
|
||||||
"versionId": blob.versionId,
|
"versionId": blob.versionId,
|
||||||
"caseObj": caseReference + "/" + caseReference + "_case.json",
|
"caseObj": buildCaseObjectPath(caseReference),
|
||||||
"isCurrentVersion": blob.isCurrentVersion,
|
"isCurrentVersion": blob.isCurrentVersion,
|
||||||
"contentLength": blob.properties.contentLength,
|
"contentLength": blob.properties.contentLength,
|
||||||
"contentType": blob.contentType,
|
"contentType": blob.contentType,
|
||||||
|
|||||||
@@ -3132,3 +3132,33 @@ Validation:
|
|||||||
Follow-ups:
|
Follow-ups:
|
||||||
|
|
||||||
- Optional next bounded slice: targeted helper-consumer tidy in the same functions for any remaining repeated query-path literals outside touched object fields.
|
- Optional next bounded slice: targeted helper-consumer tidy in the same functions for any remaining repeated query-path literals outside touched object fields.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### CL-088: TASK22269 Slice B1.13 — azurestorage touched-function caseObj helper reuse
|
||||||
|
|
||||||
|
date: 2026-03-26
|
||||||
|
author: Cline
|
||||||
|
scope: `actions/azurestorage.js`
|
||||||
|
type: change
|
||||||
|
rationale: Execute the next bounded readability slice by centralizing repeated case-object path composition in touched helper-consumer functions.
|
||||||
|
impact: Maintainability/readability improvement only; no route/query behavior changes.
|
||||||
|
status: completed
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
|
||||||
|
- Added local helper `buildCaseObjectPath(casefolderID)`.
|
||||||
|
- Replaced repeated `caseObj` string assembly in touched functions:
|
||||||
|
- `getBlobs`
|
||||||
|
- `getProgressBlobs`
|
||||||
|
- Preserved existing `caseObj` output format (`<caseRef>/<caseRef>_case.json`).
|
||||||
|
|
||||||
|
Validation:
|
||||||
|
|
||||||
|
- `npm run lint` -> pass with warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||||
|
- `node tests/phase22/index.test.cjs` -> pass
|
||||||
|
- `node tests/phase7/service-behaviour.test.cjs` -> pass (13/13)
|
||||||
|
|
||||||
|
Follow-ups:
|
||||||
|
|
||||||
|
- Optional next bounded slice: continue tiny helper reuse in touched functions only if any duplicated path literals remain and can be reduced without behavior change.
|
||||||
|
|||||||
Reference in New Issue
Block a user