MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / api

Function api

packages/ui-default/utils/index.ts:6–10  ·  view source on GitHub ↗
(method: string, args: Record<string, any>, projection?: any)

Source from the content-addressed store, hash-verified

4import { openDB } from './db';
5
6export async function api(method: string, args: Record<string, any>, projection?: any) {
7 const res = await request.post(`/d/${UiContext.domainId}/api/${encodeURIComponent(method)}`, { args, projection });
8 if (res.error) throw new Error(res.error);
9 return res;
10}
11
12interface DomainInfoCache {
13 id: string;

Callers 11

provideCodeLensesFunction · 0.90
provideCompletionItemsFunction · 0.90
searchFunction · 0.90
downloadProblemSetFunction · 0.90
loadSendTargetFunction · 0.90
updateFunction · 0.90
delFunction · 0.90
loadDomainInfoFunction · 0.85

Calls 1

postMethod · 0.45

Tested by

no test coverage detected