MCPcopy Create free account
hub / github.com/EsperoTech/yaade / createCollection

Function createCollection

client/src/api/index.tsx:61–74  ·  view source on GitHub ↗
(
  name: string,
  groups: string[],
  parentId?: number,
)

Source from the content-addressed store, hash-verified

59};
60
61const createCollection = (
62 name: string,
63 groups: string[],
64 parentId?: number,
65): Promise<Response> =>
66 fetch(BASE_PATH + 'api/collection', {
67 method: 'POST',
68 headers: DEFAULT_HEADERS,
69 body: JSON.stringify({
70 name: name,
71 groups: groups,
72 parentId,
73 }),
74 });
75
76const duplicateCollection = (id: number, name: string): Promise<Response> =>
77 fetch(BASE_PATH + `api/collection/${id}/duplicate`, {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected