Skip to content

Upstream changes#42

Open
cubap wants to merge 2 commits intomainfrom
upstream-changes
Open

Upstream changes#42
cubap wants to merge 2 commits intomainfrom
upstream-changes

Conversation

@cubap
Copy link
Copy Markdown
Member

@cubap cubap commented Apr 2, 2026

pulling in the changes made to TinyThings

cubap added 2 commits April 2, 2026 16:09
Implement getPagination in rest.js to parse, validate, and cap query limit/skip values (defaults, non-negative integer enforcement, env-configured maximums, throws 400 on malformed input). Export getPagination and add unit tests (__tests__/rest.test.js) covering defaults, parsing, error cases, and env caps. Update routes: use rest.getPagination in routes/query.js to derive limit/skip from req.query and use optional chaining for id checks in routes/overwrite.js and routes/update.js.
Implement getPagination in rest.js to parse, validate, and cap query limit/skip values (defaults, non-negative integer enforcement, env-configured maximums, throws 400 on malformed input). Export getPagination and add unit tests (__tests__/rest.test.js) covering defaults, parsing, error cases, and env caps. Update routes: use rest.getPagination in routes/query.js to derive limit/skip from req.query and use optional chaining for id checks in routes/overwrite.js and routes/update.js.
@cubap
Copy link
Copy Markdown
Member Author

cubap commented Apr 2, 2026

some of this might be redundant with #41, so be prepared to remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant