feat(client): add qimingclaw digital adapter
This commit is contained in:
@@ -32,6 +32,7 @@ import type {
|
||||
} from '../types/api';
|
||||
import { clearToken, getToken, setToken } from './auth';
|
||||
import { apiOrigin, apiBase } from './basePath';
|
||||
import { handleQimingclawDigitalApi } from './qimingclawAdapter';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Base fetch wrapper
|
||||
@@ -55,6 +56,11 @@ export async function apiFetch<T = unknown>(
|
||||
path: string,
|
||||
options: ApiFetchOptions = {},
|
||||
): Promise<T> {
|
||||
const adapterData = await handleQimingclawDigitalApi<T>(path, options);
|
||||
if (adapterData !== undefined) {
|
||||
return adapterData;
|
||||
}
|
||||
|
||||
const { timeoutMs = API_FETCH_TIMEOUT_MS, ...fetchOptions } = options;
|
||||
const token = getToken();
|
||||
const headers = new Headers(fetchOptions.headers);
|
||||
|
||||
Reference in New Issue
Block a user