| 123456789101112 |
- "use strict";
- async function fetchWithToken(url, options) {
- const authToken = localStorage.getItem('token');
- return await fetch(url, {...options, headers: {
- 'Authorization': `Bearer ${authToken}`,
- 'Content-Type': 'application/json',
- }});
- }
- export { fetchWithToken };
|