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

Function renameOrg

e2e/cloud/v2-moved-notice.test.ts:89–102  ·  view source on GitHub ↗
(target: TargetShape, identity: Identity, name: string)

Source from the content-addressed store, hash-verified

87
88/** Rename the identity's active org through the product's own settings route. */
89const renameOrg = (target: TargetShape, identity: Identity, name: string): Effect.Effect<void> =>
90 Effect.promise(async () => {
91 const response = await fetch(new URL("/api/account/name", target.baseUrl), {
92 method: "PATCH",
93 headers: {
94 ...identity.headers,
95 origin: new URL(target.baseUrl).origin,
96 "content-type": "application/json",
97 },
98 body: JSON.stringify({ name }),
99 });
100 if (!response.ok) throw new Error(`/api/account/name failed (${response.status})`);
101 await response.body?.cancel();
102 });
103
104const noticeOf = (page: Page) => page.getByRole("dialog");
105

Callers 1

Calls 2

cancelMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected