TASK22269: migrate portal deleteMyRepresentations to signed delete helper
This commit is contained in:
@@ -147,22 +147,15 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
|
|||||||
myRepresentationsID
|
myRepresentationsID
|
||||||
});
|
});
|
||||||
|
|
||||||
return buildHashedQueryUrl(queryUrl)
|
return deleteSignedJson(queryUrl, {
|
||||||
.then((signedUrl) =>
|
|
||||||
requestJson({
|
|
||||||
method: "delete",
|
|
||||||
url: signedUrl,
|
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json;odata.metadata=none",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer":
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
})
|
}).catch((error) => {
|
||||||
)
|
|
||||||
.catch((error) => {
|
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2768,3 +2768,36 @@ Validation:
|
|||||||
Follow-ups:
|
Follow-ups:
|
||||||
|
|
||||||
- Continue Sequence B B1 in future bounded slices by migrating additional signed flows one module/function cluster at a time (outside this slice).
|
- Continue Sequence B B1 in future bounded slices by migrating additional signed flows one module/function cluster at a time (outside this slice).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### CL-077: TASK22269 Slice B1.2 — portal signed-delete bundle (headered delete migration)
|
||||||
|
|
||||||
|
date: 2026-03-25
|
||||||
|
author: Cline
|
||||||
|
scope: `actions/services/portalDirectService.js`
|
||||||
|
type: change
|
||||||
|
rationale: Continue signed-request consolidation using bounded grouping by migrating the remaining portal signed delete flow (`deleteMyRepresentations`) onto shared signed helper while preserving required OData headers.
|
||||||
|
impact: Further reduces duplicated sign+delete boilerplate in portal service and centralizes signed DELETE execution semantics.
|
||||||
|
status: completed
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
|
||||||
|
- Migrated `deleteMyRepresentations` from inline `buildHashedQueryUrl(...).then(requestJson(...))` to shared `deleteSignedJson(queryUrl, { headers })`.
|
||||||
|
- Preserved behavior-critical headers exactly:
|
||||||
|
- `OData-MaxVersion`
|
||||||
|
- `OData-Version`
|
||||||
|
- `Accept`
|
||||||
|
- `Prefer`
|
||||||
|
- `Content-Type`
|
||||||
|
- Preserved existing catch/log behavior (`consoleLogger` with safe undefined return on failure).
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
- Next bounded signed GET candidate in portal service is `sendRepCompleteMessage` (single signed URL + GET request path).
|
||||||
|
|||||||
Reference in New Issue
Block a user