function validateInvite
validateInvite(token: string): string

Returns the id of the inviter when invite token is unused and still in its window, which is the one after which db/startup.ts purges it. It doesn't claim the invite: sign-up goes through claimInvite.

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 { validateInvite } from "api/services/invite-service.ts";