refactor(api): migrate batch 10 endpoints to relayGet
This commit is contained in:
@@ -1006,3 +1006,34 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Continue P2-S2 with next bounded batch from remaining legacy relay GET endpoints (`createwatchedcases_api`, `deletewatchedcasesproxy_api`, `getadvancedsearch_api`, `getadvancedsearchpaged_api`, `getbasicsearch_by_address_api`, `getbasicsearch_by_lparref_api`, `getdnscoords_api`, `getmylpacases_api`, `getportallogin_api`).
|
||||
|
||||
---
|
||||
|
||||
### CL-027: TASK22229 P2-S2 Batch 10 (portal login + my LPA cases relay GET pair)
|
||||
|
||||
date: 2026-03-24
|
||||
author: Cline
|
||||
scope: `pages/api/endpoint/{getportallogin_api,getmylpacases_api}.js`, `tests/phase21/endpoint-handler-contract.test.cjs`
|
||||
type: change
|
||||
rationale: Continue bounded relay migration by moving two remaining high-use portal retrieval endpoints to shared `relayGet` while preserving existing hash/lookup guards and response contracts.
|
||||
impact: Further relay boilerplate reduction and consistent forwarding behavior in portal login/LPA case retrieval flows; no intended API contract changes.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Migrated Batch 10 endpoints to shared `relayGet`:
|
||||
- `getportallogin_api.js` (preserved hash validation guard and error contract)
|
||||
- `getmylpacases_api.js` (preserved LPA lookup/404 guard and title transform)
|
||||
- Preserved endpoint-specific behavior:
|
||||
- `getportallogin_api`: raw + encoded hash candidate validation before relay call
|
||||
- `getmylpacases_api`: JSONPath LPA lookup with `LPA_NOT_FOUND` handling and `pinswg_title` enrichment transform
|
||||
- Updated phase21 endpoint contract tests to inject `relayGet` mocks for migrated handlers in validation/catch/success paths.
|
||||
|
||||
Validation:
|
||||
|
||||
- `node tests/phase21/endpoint-handler-contract.test.cjs` -> pass (152/152)
|
||||
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Continue P2-S2 with the remaining legacy relay GET candidates (`createwatchedcases_api`, `deletewatchedcasesproxy_api`, `getadvancedsearch_api`, `getadvancedsearchpaged_api`, `getbasicsearch_by_address_api`, `getbasicsearch_by_lparref_api`, `getdnscoords_api`).
|
||||
|
||||
Reference in New Issue
Block a user