MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / revokeInviteCode

Function revokeInviteCode

apps/host-selfhost/src/auth/invites.ts:117–122  ·  view source on GitHub ↗
(client: Client, id: string)

Source from the content-addressed store, hash-verified

115// Revoke = delete a pending (unused) code. Used codes are kept as an audit row
116// (their membership already exists); deleting one would not remove the member.
117export const revokeInviteCode = async (client: Client, id: string): Promise<void> => {
118 await client.execute({
119 sql: "DELETE FROM invite_code WHERE id = ? AND used_at IS NULL",
120 args: [id],
121 });
122};
123
124// A code is redeemable when it exists, is unused, and is unexpired.
125export const findRedeemableCode = async (

Callers 1

handlers.tsFile · 0.90

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected