Skip to content

fix(files): resolve async file route params - #118

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

fix(files): resolve async file route params#118
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/qryptchat-file-route-params

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • Resolve Promise-based Next.js route params before reading file and message ids in file APIs
  • Return explicit 400 responses for missing messageId/fileId instead of querying with undefined ids
  • Add regression coverage for /api/files/message/[messageId] and /api/files/[fileId]/encrypted
  • Remove an unused helper from the message files route

Tests

  • corepack pnpm exec vitest run --config $env:TEMP/qryptchat-vitest-no-react.config.mjs "src/app/api/files/message/[messageId]/route.test.js" "src/app/api/files/[fileId]/encrypted/route.test.js"
  • corepack pnpm exec oxlint "src/app/api/files/message/[messageId]/route.js" "src/app/api/files/message/[messageId]/route.test.js" "src/app/api/files/[fileId]/encrypted/route.js" "src/app/api/files/[fileId]/encrypted/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 475e6c1 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