diff --git a/src/__tests__/list-cap-reader-guard.test.ts b/src/__tests__/list-cap-reader-guard.test.ts index 3c6752832..94c5517fa 100644 --- a/src/__tests__/list-cap-reader-guard.test.ts +++ b/src/__tests__/list-cap-reader-guard.test.ts @@ -6,8 +6,8 @@ * / `meta.limit`). The web client read only `data` (`apiGet`), so the signal * reached nobody: twelve routes sent it and no surface showed it. A capped * route is now bound to a reader, a production file outside the API tree - * that fetches the route's path through `apiGetList` / `apiPostList`, the - * one client reader of the cap, which a surface pairs with `ListCapNotice`. + * that fetches the route's path through `apiGetList`, the one client reader + * of the cap, which a surface pairs with `ListCapNotice`. * * The routes are derived from the tree (every route file that answers with * `apiListSuccess`), never listed by hand, so a newly capped route fails here @@ -48,7 +48,7 @@ function clientPathPattern(route: string): RegExp { ) .join("/"); return new RegExp( - `\\bapi(?:Get|Post)List\\s*<[\\s\\S]{0,200}?>\\s*\\(\\s*["\`]${body}(?:[?"\`])|\\bapi(?:Get|Post)List\\s*\\(\\s*["\`]${body}(?:[?"\`])`, + `\\bapiGetList\\s*<[\\s\\S]{0,200}?>\\s*\\(\\s*["\`]${body}(?:[?"\`])|\\bapiGetList\\s*\\(\\s*["\`]${body}(?:[?"\`])`, ); } diff --git a/src/lib/api/api-fetch.ts b/src/lib/api/api-fetch.ts index ffabbc4a8..6f2648c1d 100644 --- a/src/lib/api/api-fetch.ts +++ b/src/lib/api/api-fetch.ts @@ -231,19 +231,6 @@ export async function apiGetList( return { data, cap: readListCap(meta) }; } -/** POST variant of {@link apiGetList}, for a list read with a body. */ -export async function apiPostList( - path: string, - body?: unknown, - init?: RequestInit, -): Promise<{ data: T; cap: ListCap | null }> { - const { data, meta } = await apiFetchEnvelope( - path, - withDefaultIdempotencyKey(withJsonBody("POST", body, init)), - ); - return { data, cap: readListCap(meta) }; -} - /** GET — resolves with the unwrapped `data` payload. */ export function apiGet( path: string, diff --git a/src/lib/api/list-cap.ts b/src/lib/api/list-cap.ts index 98cd2436c..45155609d 100644 --- a/src/lib/api/list-cap.ts +++ b/src/lib/api/list-cap.ts @@ -18,7 +18,7 @@ * reads `meta` decodes it unchanged. `truncated` is exact: true only when a * row past the limit exists. The OpenAPI side is `listEnvelope` in * `src/lib/openapi/routes/shared.ts`. A client reads it through `apiGetList` - * / `apiPostList` (`src/lib/api/api-fetch.ts`) and shows it with + * (`src/lib/api/api-fetch.ts`) and shows it with * `ListCapNotice`; `src/__tests__/list-cap-reader-guard.test.ts` binds every * capped route to such a reader. */