Create middleswares
This commit is contained in:
@@ -8,9 +8,6 @@ export async function clientFetch(url: string, options: RequestInit = {}): Promi
|
||||
.find(row => row.startsWith('Authorization='))
|
||||
?.split('=')[1] || localStorage.getItem('Authorization');
|
||||
|
||||
console.log('authToken', authToken);
|
||||
|
||||
// Merge Authorization header if token is found
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
...(authToken ? { Authorization: `Bearer ${authToken}` } : {}),
|
||||
|
||||
Reference in New Issue
Block a user