diff --git a/src/app/api/circles/[id]/invite/route.ts b/src/app/api/circles/[id]/invite/route.ts index c942c3d..27359a7 100644 --- a/src/app/api/circles/[id]/invite/route.ts +++ b/src/app/api/circles/[id]/invite/route.ts @@ -26,7 +26,7 @@ export async function POST( // Cryptographically random 32-byte token (64 hex chars) — unguessable const token = randomBytes(32).toString("hex"); - const expiresAt = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000); // 7 days + const expiresAt = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString(); // 7 days const [invite] = await sql.unsafe( `INSERT INTO circle_invites (circle_id, token, created_by, expires_at)