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:
parent
b6a514b547
commit
636780870d
|
|
@ -29,9 +29,9 @@ async function fetchWithAuth(
|
|||
tokenPreview: token ? `${token.substring(0, 20)}...` : 'Aucun',
|
||||
});
|
||||
|
||||
const headers: HeadersInit = {
|
||||
const headers: Record<string, string> = {
|
||||
'Content-Type': 'application/json',
|
||||
...options.headers,
|
||||
...options.headers as Record<string, string>,
|
||||
};
|
||||
|
||||
if (token) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user