(url: string, options: RequestInit = {})
| 63 | }); |
| 64 | |
| 65 | async function fetchWithHeaders(url: string, options: RequestInit = {}): Promise<Response> { |
| 66 | const { getApiAuthHeaders } = await import('@/services/api'); |
| 67 | const headers = await getApiAuthHeaders(); |
| 68 | |
| 69 | return fetch(url, { |
| 70 | ...options, |
| 71 | headers: { |
| 72 | ...headers, |
| 73 | 'Content-Type': 'application/json', |
| 74 | ...options.headers, |
| 75 | }, |
| 76 | }); |
| 77 | } |
| 78 | |
| 79 | export const useWebhookStore = create<WebhookStore>((set, get) => ({ |
| 80 | ...createInitialState(), |
no test coverage detected