function claimInvite
claimInvite(token: string): string

Marks invite token used and returns the inviter's id. Call it before the async account creation, and releaseInvite if that fails: checking first and marking after would let parallel sign-ups share one invite.

Parameters

token: string

Return Type

string

Throws

APIException

404 when the invite doesn't exist or has expired, 409 when it has been used.

Usage

import { claimInvite } from "api/services/invite-service.ts";