(auth: Auth, organizationId: string)
| 325 | // table and the count gates the first-run claim; reading through it keeps the |
| 326 | // gate logic next to the writes. |
| 327 | export const countOrgMembers = (auth: Auth, organizationId: string): Promise<number> => |
| 328 | auth.$context.then(({ adapter }) => |
| 329 | adapter.count({ model: "member", where: [{ field: "organizationId", value: organizationId }] }), |
| 330 | ); |
| 331 | |
| 332 | // True when the single org has no members yet — the unclaimed first-run state. |
| 333 | const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => { |
no test coverage detected