mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
refactor(api): drop apiPostList, which no capped list reads
Every capped route is read with GET, so the POST reader had no caller and failed the dead-code gate. The list-cap guard now binds a capped route to apiGetList alone, which is the reader that exists.
This commit is contained in:
1 parent
b08d527045
commit
2be262d574
3 files changed
+4
-17
No files matched your search
@@ -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}(?:[?"\`])`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user