Skip to content

Validate modules pagination params#21

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:fix-modules-pagination
Jun 18, 2026
Merged

Validate modules pagination params#21
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:fix-modules-pagination

Conversation

@phucnguyen1707

Copy link
Copy Markdown
Contributor

Summary

Fixes #10 by validating the modules list pagination query before calculating the Supabase range.

Invalid values such as non-numeric strings, Infinity, negative numbers, zero, and fractional values now fall back to the documented defaults instead of producing NaN or silently truncating decimals. Valid positive limits are still capped at 50.

Verification

  • pnpm --filter @profullstack/threatcrush-web test src/app/api/modules/tests/route.test.ts
  • pre-commit hook passed Build CLI and web build
  • git diff --check

@ralyodio ralyodio merged commit e2aee48 into profullstack:master Jun 18, 2026
9 checks passed
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.

Modules API passes NaN pagination values to Supabase

2 participants