MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createAnotherOrg

Function createAnotherOrg

e2e/cloud/connection-owner-isolation.test.ts:129–134  ·  view source on GitHub ↗
(target: TargetShape, identity: Identity, name: string)

Source from the content-addressed store, hash-verified

127
128/** Create another org for this account; returns the identity bound to it. */
129const createAnotherOrg = (target: TargetShape, identity: Identity, name: string) =>
130 Effect.gen(function* () {
131 const response = yield* postJson(target, "/api/auth/create-organization", identity, { name });
132 const created = (yield* Effect.promise(() => response.clone().json())) as { id: string };
133 return withRefreshedSession(identity, response, created.id);
134 });
135
136// `/api/auth/switch-organization` (session-cookie-based org switching) was
137// removed in #1000 (commit 1f9bfe06b): the URL is now the scope authority, not

Calls 4

postJsonFunction · 0.70
withRefreshedSessionFunction · 0.70
jsonMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected