refactor(actions): adopt endpoint client in account direct service
This commit is contained in:
@@ -1513,3 +1513,34 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Next optional bounded slice: adopt `getJson`/`requestJson` for selected low-risk read paths in `searchDirectService` or `caseDirectService` while preserving per-function error semantics.
|
||||
|
||||
---
|
||||
|
||||
### CL-041: TASK22260 next slice — account direct service endpointClient adoption
|
||||
|
||||
date: 2026-03-25
|
||||
author: Cline
|
||||
scope: `actions/services/accountDirectService.js`
|
||||
type: change
|
||||
rationale: Continue incremental façade migration by moving account direct-service request plumbing onto shared endpoint client helpers while preserving existing error-return behavior contracts.
|
||||
impact: Reduces duplicated axios response extraction boilerplate and aligns account service request handling with the emerging client-layer pattern.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Refactored `actions/services/accountDirectService.js` to consume shared endpoint client helpers:
|
||||
- `getJson(...)` for GET requests
|
||||
- `requestJson(...)` for config-based POST requests
|
||||
- Kept existing relay hash-signing behavior unchanged via `buildHashedQueryUrl` from `relayClient`.
|
||||
- Preserved existing catch-path semantics, including:
|
||||
- logging with `consoleLogger`
|
||||
- returning `JSON.stringify(error)` in portal login functions
|
||||
- returning `error.response` in preferred-language failure path
|
||||
|
||||
Validation:
|
||||
|
||||
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Optional next bounded slice: adopt endpoint client helpers in selected `portalDirectService` GET/POST helper paths while preserving delete/hash flow semantics.
|
||||
|
||||
Reference in New Issue
Block a user