Implementation de la notion d'espace d'investissement
This commit is contained in:
1 parent
6b6cad7cd6
commit
4b7df66862
54 files changed
+6782
-288
No files matched your search
@@ -6,10 +6,15 @@ function authHeaders() {
|
||||
const token = localStorage.getItem('cl_token');
|
||||
const investisseurId = localStorage.getItem('cl_investisseur_id');
|
||||
const deviceToken = localStorage.getItem('cl_device_token');
|
||||
// Même clé que WorkspaceContext.jsx (KEY_ACTIVE) — miroir de X-Investisseur-Id,
|
||||
// sert à flêcher côté serveur les nouvelles lignes vers le workspace actif
|
||||
// (Étape 2a du retrofit workspace_id, cf. workspaceScope.js).
|
||||
const workspaceId = localStorage.getItem('cl_active_workspace_id');
|
||||
const h = {};
|
||||
if (token) h['Authorization'] = `Bearer ${token}`;
|
||||
if (investisseurId) h['X-Investisseur-Id'] = investisseurId;
|
||||
if (deviceToken) h['X-Device-Token'] = deviceToken;
|
||||
if (workspaceId) h['X-Workspace-Id'] = workspaceId;
|
||||
return h;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user