feat(users): integrate user info and services APIs into 3-tab detail panel with proper padding

This commit is contained in:
2026-08-12 00:35:59 +08:00
parent 703d4dc583
commit 1a5489a361
17 changed files with 4127 additions and 382 deletions
+7
View File
@@ -119,6 +119,12 @@ export async function request<T>(path: string, options: RequestOptions = {}): Pr
return (await res.json()) as T
}
export async function requestText(path: string, signal?: AbortSignal): Promise<string> {
const res = await rawRequest(path, { signal })
if (!res.ok) throw await parseError(res)
return res.text()
}
export const api = {
get: <T>(path: string, params?: ListParams, signal?: AbortSignal) =>
request<T>(path, { params, signal }),
@@ -128,4 +134,5 @@ export const api = {
delete: <T>(path: string, body?: unknown) => request<T>(path, { method: 'DELETE', body }),
anonymousPost: <T>(path: string, body?: unknown) =>
request<T>(path, { method: 'POST', body, anonymous: true }),
text: (path: string, signal?: AbortSignal) => requestText(path, signal),
}