Amélioration 2FA
This commit is contained in:
+3
-3
@@ -5,9 +5,11 @@ const BASE = import.meta.env.VITE_API_URL || '/api';
|
||||
function authHeaders() {
|
||||
const token = localStorage.getItem('cl_token');
|
||||
const investisseurId = localStorage.getItem('cl_investisseur_id');
|
||||
const deviceToken = localStorage.getItem('cl_device_token');
|
||||
const h = {};
|
||||
if (token) h['Authorization'] = `Bearer ${token}`;
|
||||
if (investisseurId) h['X-Investisseur-Id'] = investisseurId;
|
||||
if (deviceToken) h['X-Device-Token'] = deviceToken;
|
||||
return h;
|
||||
}
|
||||
|
||||
@@ -63,6 +65,4 @@ export const api = {
|
||||
}),
|
||||
exportUrl: (path, params) => {
|
||||
const qs = params ? '?' + new URLSearchParams(params).toString() : '';
|
||||
return BASE + path + qs;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user