(params: {
invitationId: string
rotateToken?: boolean
currentToken: string
})
| 320 | } |
| 321 | |
| 322 | export async function prepareInvitationResend(params: { |
| 323 | invitationId: string |
| 324 | rotateToken?: boolean |
| 325 | currentToken: string |
| 326 | }): Promise<{ tokenForEmail: string; nextExpiresAt: Date; nextToken: string | null }> { |
| 327 | const nextExpiresAt = computeInvitationExpiry() |
| 328 | const nextToken = params.rotateToken ? generateId() : null |
| 329 | const tokenForEmail = nextToken ?? params.currentToken |
| 330 | return { tokenForEmail, nextExpiresAt, nextToken } |
| 331 | } |
| 332 | |
| 333 | export async function persistInvitationResend(params: { |
| 334 | invitationId: string |
no test coverage detected