Skip to content

fix(api): resolve async user lookup route params - #117

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/qryptchat-async-route-params
Jul 1, 2026
Merged

fix(api): resolve async user lookup route params#117
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/qryptchat-async-route-params

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • Resolve Promise-based Next.js route params in user lookup endpoints before reading username or identifier
  • Prevent valid /api/users/by-username/[username] and /api/users/by-id/[identifier] requests from querying with undefined params
  • Add regression tests for async route params and missing param handling

Tests

  • corepack pnpm exec vitest run --config $env:TEMP/qryptchat-vitest-no-react.config.mjs "src/app/api/users/by-username/[username]/route.test.js" "src/app/api/users/by-id/[identifier]/route.test.js"
  • corepack pnpm exec oxlint "src/app/api/users/by-username/[username]/route.js" "src/app/api/users/by-username/[username]/route.test.js" "src/app/api/users/by-id/[identifier]/route.js" "src/app/api/users/by-id/[identifier]/route.test.js"

Note: the default vitest.config.js still fails to load locally because @vitejs/plugin-react imports a non-exported Vite internal path, so the focused route tests were run with a minimal no-React Vitest config.

@ralyodio
ralyodio merged commit c4f33cc into profullstack:master Jul 1, 2026
8 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.

2 participants