Private
Public Access
Add the ability to resend unaccepted invites (#60)
Previously the only way to resend was to re-invite the same email from scratch, creating a whole new invite row. Adds a "Resend" action next to Revoke on each pending invite -- rotates the token and refreshes the 7-day expiry on the same row (the old link stops working the moment it's used, same instinct as a password-reset resend), then re-sends the invite email. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,13 @@ export function revokeSiteInvite(inviteId: string): Promise<SiteInvite> {
|
||||
return apiFetch<SiteInvite>(`/api/admin/invites/${inviteId}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
// #60: same invite row, not a new one -- a fresh token/expiry, and the old
|
||||
// link stops working the moment this is called (see the backend's own
|
||||
// resend_site_invite for why).
|
||||
export function resendSiteInvite(inviteId: string): Promise<SiteInvite> {
|
||||
return apiFetch<SiteInvite>(`/api/admin/invites/${inviteId}/resend`, { method: 'POST' })
|
||||
}
|
||||
|
||||
export function getSmtpSettings(): Promise<SmtpSettings | null> {
|
||||
return apiFetch<SmtpSettings | null>('/api/admin/settings/smtp')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user