feat: implement tenant context resolution and update profiles API
- Introduced tenant context resolution in the profiles API, allowing for effective club identification based on user memberships. - Updated the `GET /profiles/me` endpoint to return `effective_club_id` and removed reliance on the deprecated `X-Active-Club-Id` header. - Bumped application version to 0.8.22 in both backend and frontend files. - Enhanced changelog to document the new version and changes made in this release.
This commit is contained in:
1 parent
413a096432
commit
4b6fd49940
8 files changed
+362
-11
No files matched your search
@@ -6,6 +6,11 @@ const AuthContext = createContext(null)
|
||||
function syncStoredActiveClub(profile) {
|
||||
const clubs = profile?.clubs || []
|
||||
const ids = new Set(clubs.map((c) => String(c.id)))
|
||||
const eff = profile?.effective_club_id
|
||||
if (eff != null && eff !== '' && ids.has(String(eff))) {
|
||||
localStorage.setItem(ACTIVE_CLUB_STORAGE_KEY, String(eff))
|
||||
return
|
||||
}
|
||||
const stored = localStorage.getItem(ACTIVE_CLUB_STORAGE_KEY)
|
||||
if (stored && ids.has(stored)) return
|
||||
|
||||
|
||||
Reference in new issue
Block a user