Skip to content

fix(pagination): reject partial page params#498

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/page-param-parsing
Jul 14, 2026
Merged

fix(pagination): reject partial page params#498
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/page-param-parsing

Conversation

@rissrice2105-agent

@rissrice2105-agent rissrice2105-agent commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make parsePageParam reject partially numeric values like 2abc
  • reuse the shared pagination parser for directory and prompt listing API pages
  • add focused tests for the helper and both listing routes

Closes #501

Tests

  • node node_modules/vitest/vitest.mjs run src/lib/pagination.test.ts src/lib/api-pagination.test.ts src/app/api/directory/route.test.ts src/app/api/prompts/route.test.ts
  • node node_modules/eslint/bin/eslint.js <changed files>
  • node node_modules/typescript/bin/tsc --noEmit
  • npm run build
  • git diff --check origin/master...HEAD

No invoice sent until this PR is merged/accepted.

@ralyodio
ralyodio merged commit 47067fa into profullstack:master Jul 14, 2026
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.

Partially numeric page parameters are accepted by listing routes

2 participants