Skip to content

fix(den): proxy legacy org-scoped routes#1502

Merged
src-opn merged 3 commits intodevfrom
task/proxy-old-api-paths
Apr 20, 2026
Merged

fix(den): proxy legacy org-scoped routes#1502
src-opn merged 3 commits intodevfrom
task/proxy-old-api-paths

Conversation

@src-opn
Copy link
Copy Markdown
Collaborator

@src-opn src-opn commented Apr 20, 2026

Summary

  • proxy legacy /v1/orgs/:orgId/* requests into the new unscoped /v1/* handlers instead of only aliasing invitation routes
  • preserve the existing /v1/orgs/... endpoints by keeping the generic proxy behind the current explicit org routes and only forwarding valid org_ ids
  • carry the legacy org id through middleware so old clients still resolve the intended workspace context, and keep the Den Docker image fixes needed for local verification

Testing

  • pnpm --filter @openwork-ee/den-api exec tsc --noEmit
  • bun test ee/apps/den-api/test/org-invitations.test.ts
  • bash packaging/docker/den-dev-up.sh
  • verified in the browser that sign-up/org creation worked, the legacy invitation create route returned 201, the legacy cancel route returned 200, and the session active_organization_id was rehydrated from membership

Restore the old org-scoped invitation paths and rehydrate sessions to a user's first organization when activeOrg is missing so older clients keep working. Include the shared types workspace in Den Docker images so the local verification stack can still build.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Apr 20, 2026 6:40pm
openwork-den Ready Ready Preview, Comment Apr 20, 2026 6:40pm
openwork-den-worker-proxy Ready Ready Preview, Comment Apr 20, 2026 6:40pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 20, 2026 6:40pm
openwork-share Ready Ready Preview, Comment Apr 20, 2026 6:40pm

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Route legacy '/v1/orgs/:orgId/*' requests into the new unscoped '/v1/*' handlers while preserving the current '/v1/orgs/...' endpoints. Pass the org id through middleware so old clients keep the intended workspace context and add coverage for the generic proxy behavior.
Drop the leftover invitation-specific handler extraction now that legacy org-scoped forwarding is handled generically in the org router. Keep the proxy behavior intact while returning the invitation routes closer to their original shape.
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.

1 participant