Skip to content

fix(user): honor profile route id#124

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

fix(user): honor profile route id#124
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/qryptchat-user-profile-route

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • resolves Promise-based params in /api/user/profile/[userId]
  • rejects missing path ids and path ids that do not match the authenticated user's internal or auth id
  • adds regression coverage for internal id, auth id, and forbidden mismatched id cases

Why

The dynamic profile endpoint accepted [userId] but ignored it, so /api/user/profile/anything returned the authenticated user's profile. That makes the route misleading and unsafe for clients/caches that key behavior on the path id.

Validation

  • corepack pnpm exec vitest run --config %TEMP%/qryptchat-vitest-no-react.config.mjs src/app/api/user/profile/[userId]/route.test.js
  • corepack pnpm exec oxlint src/app/api/user/profile/[userId]/route.js src/app/api/user/profile/[userId]/route.test.js

@ralyodio ralyodio merged commit 6ad7148 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