Create middleswares

This commit is contained in:
g
2025-02-07 22:21:26 +00:00
parent b94391c8d5
commit 80eb0a6c1b
2 changed files with 34 additions and 3 deletions

View File

@@ -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}` } : {}),