(auth: Auth, organizationId: string)
| 227 | // table and the count gates the first-run claim; reading through it keeps the |
| 228 | // gate logic next to the writes. |
| 229 | export const countOrgMembers = (auth: Auth, organizationId: string): Promise<number> => |
| 230 | auth.$context.then(({ adapter }) => |
| 231 | adapter.count({ model: "member", where: [{ field: "organizationId", value: organizationId }] }), |
| 232 | ); |
| 233 | |
| 234 | // True when the single org has no members yet — the unclaimed first-run state. |
| 235 | const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => { |
no test coverage detected