MCPcopy
hub / github.com/7836246/cursor2api / getAuthHeader

Function getAuthHeader

vue-ui/src/api.ts:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 3

apiFetchFunction · 0.85
clearLogsFunction · 0.85
saveConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected