MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / performTokenRefresh

Method performTokenRefresh

frontend/src/lib/api/apiClient.ts:46–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 private async performTokenRefresh(): Promise<void> {
47 const response = await fetch(`${this.baseURL}/auth/refresh`, {
48 method: 'POST',
49 credentials: 'include',
50 headers: {
51 'Content-Type': 'application/json',
52 },
53 });
54
55 if (!response.ok) {
56 throw new Error('Token refresh failed');
57 }
58 }
59
60 private async handleResponse<T>(response: Response, originalRequest?: { endpoint: string; options: RequestOptions }): Promise<T> {
61 if (!response.ok) {

Callers 1

refreshTokenMethod · 0.95

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected