Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix date

Marc Seitz95ac709b00a6
diff --git a/app/(ee)/api/teams/[teamId]/saml/route.ts b/app/(ee)/api/teams/[teamId]/saml/route.ts
index 25d0848f..272d982e 100644
--- a/app/(ee)/api/teams/[teamId]/saml/route.ts
+++ b/app/(ee)/api/teams/[teamId]/saml/route.ts
@@ -273,16 +273,18 @@ export async function PATCH(
}
}
+ const now = enforced ? new Date() : null;
+
await prisma.team.update({
where: { id: teamId },
data: {
- ssoEnforcedAt: enforced ? new Date() : null,
+ ssoEnforcedAt: now,
},
});
return NextResponse.json({
enforced,
- ssoEnforcedAt: enforced ? new Date().toISOString() : null,
+ ssoEnforcedAt: now?.toISOString() ?? null,
});
} catch (error: any) {
console.error("[SAML] Update enforcement error:", error);