Repository navigation
fix(console): resolve the organization header on organization routes only - #13993
Conversation
…only The X-Appwrite-Organization header belongs to the Organization API, which is where the console SDK sends it. The console team resource resolved it for every console route; it now does so on organization routes only, so every other console route keeps naming its own team. Co-Authored-By: Claude Fable 5.1 <[email protected]>
🟢 Tier S · Ready to merge
On the console project, the Latest changes: The header check moved from a
📂 Walkthrough · 3
Reviewed the commits since |
|
The Organization module already declares its routes with the organization group, and its init hook requires the team on that same group. Resolve the header by the group rather than by path prefix, so the two sides of the contract read the same declaration. Co-Authored-By: Claude Fable 5.1 <[email protected]>
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
What does this PR do?
The
X-Appwrite-Organizationheader belongs to the Organization API (/v1/organization/*), which is the only place the console SDK sends it. The consoleteamresource was resolving the header for every console route; it now does so only for routes in theorganizationgroup (the same group the Organization module's init hook keys on), so every other console route keeps naming its own team. The console admin branch inshared/api.phpgets a comment stating which team it reads.Test Plan
TeamsConsoleClientTest: team routes behave the same with and without the header, both for a member of the team and for a member of another team.tests/e2e/Services/Organization/*keep covering the header on organization routes.composer lintandcomposer analyzeon the touched files,composer refactor:check.Related PRs and Issues
Checklist
🤖 Generated with Claude Code