()
| 3 | import { getActivePinia } from 'pinia'; |
| 4 | |
| 5 | function getAuthHeader(): Record<string, string> { |
| 6 | const token = localStorage.getItem('cursor2api_token'); |
| 7 | return token ? { Authorization: `Bearer ${token}` } : {}; |
| 8 | } |
| 9 | |
| 10 | async function apiFetch<T>(path: string): Promise<T> { |
| 11 | const res = await fetch(path, { headers: getAuthHeader() }); |
no outgoing calls
no test coverage detected