fix: change headers type from HeadersInit to Record<string, string>

Replace HeadersInit type with Record<string, string> for headers object to allow index access with bracket notation. This resolves the TypeScript error "Property 'Authorization' does not exist on type 'HeadersInit'".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
soufiane 2025-11-18 02:01:53 +01:00
parent b6a514b547
commit 636780870d

View File

@ -29,9 +29,9 @@ async function fetchWithAuth(
tokenPreview: token ? `${token.substring(0, 20)}...` : 'Aucun', tokenPreview: token ? `${token.substring(0, 20)}...` : 'Aucun',
}); });
const headers: HeadersInit = { const headers: Record<string, string> = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
...options.headers, ...options.headers as Record<string, string>,
}; };
if (token) { if (token) {