feat: Enhance email expiration options and update README

This commit is contained in:
beilunyang
2024-12-21 01:36:35 +08:00
parent 3566a33c3b
commit 929f310202
4 changed files with 12 additions and 5 deletions

View File

@@ -58,7 +58,9 @@ export async function POST(request: Request) {
}
const now = new Date()
const expires = new Date(now.getTime() + expiryTime)
const expires = expiryTime === 0
? new Date('9999-01-01T00:00:00.000Z')
: new Date(now.getTime() + expiryTime)
const emailData: typeof emails.$inferInsert = {
address,