(target: TargetShape, identity: Identity, name: string)
| 127 | |
| 128 | /** Create another org for this account; returns the identity bound to it. */ |
| 129 | const 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 |
no test coverage detected