feat(B3): wire X-Tenant-ID header interceptor in axios client

Reads schaeffler_tenant_id from localStorage and injects it as
X-Tenant-ID header for all API requests (admin cross-tenant view).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 16:31:04 +01:00
parent 251dd703ed
commit 5da90b5434
+2
View File
@@ -9,6 +9,8 @@ const api = axios.create({
api.interceptors.request.use((config) => {
const token = useAuthStore.getState().token
if (token) config.headers.Authorization = `Bearer ${token}`
const tenantId = localStorage.getItem('schaeffler_tenant_id')
if (tenantId) config.headers['X-Tenant-ID'] = tenantId
return config
})