Skip to content

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

feat: remove drv

Marc Seitz2f38161b9cd9
diff --git a/app/api/views-dataroom/route.ts b/app/api/views-dataroom/route.ts
index e2200ea5..8ec1ca9b 100644
--- a/app/api/views-dataroom/route.ts
+++ b/app/api/views-dataroom/route.ts
@@ -46,7 +46,6 @@ export async function POST(request: NextRequest) {
documentName,
hasPages,
ownerId,
- dataroomVerified,
linkType,
dataroomViewId,
viewType,
@@ -61,7 +60,6 @@ export async function POST(request: NextRequest) {
documentName: string | undefined;
hasPages: boolean | undefined;
ownerId: string | null;
- dataroomVerified: boolean | undefined;
linkType: string;
dataroomViewId?: string;
viewType: "DATAROOM_VIEW" | "DOCUMENT_VIEW";
@@ -397,7 +395,7 @@ export async function POST(request: NextRequest) {
// Request OTP Code for email verification if
// 1) email verification is required and
// 2) code is not provided or token not provided
- if (link.emailAuthenticated && !code && !token && !dataroomVerified) {
+ if (link.emailAuthenticated && !code && !token) {
const ipAddressValue = ipAddress(request);
// Rate limit per email/link combination (1 per 30 seconds) to prevent OTP flooding
@@ -453,7 +451,7 @@ export async function POST(request: NextRequest) {
);
}
- if (link.emailAuthenticated && code && !dataroomVerified) {
+ if (link.emailAuthenticated && code) {
const ipAddressValue = ipAddress(request);
const { success } = await ratelimit(10, "1 m").limit(
`verify-otp:${ipAddressValue}`,
@@ -522,7 +520,7 @@ export async function POST(request: NextRequest) {
isEmailVerified = true;
}
- if (link.emailAuthenticated && token && !dataroomVerified) {
+ if (link.emailAuthenticated && token) {
const ipAddressValue = ipAddress(request);
const { success } = await ratelimit(10, "1 m").limit(
`verify-email:${ipAddressValue}`,
@@ -572,9 +570,6 @@ export async function POST(request: NextRequest) {
isEmailVerified = true;
}
- if (link.emailAuthenticated && dataroomVerified) {
- isEmailVerified = true;
- }
}
let viewer: { id: string; email: string; verified: boolean } | null = null;
diff --git a/components/view/dataroom/dataroom-document-view.tsx b/components/view/dataroom/dataroom-document-view.tsx
index 3a0943fe..70e72feb 100644
--- a/components/view/dataroom/dataroom-document-view.tsx
+++ b/components/view/dataroom/dataroom-document-view.tsx
@@ -127,7 +127,6 @@ export default function DataroomDocumentView({
);
const [verificationRequested, setVerificationRequested] =
useState<boolean>(false);
- const [dataroomVerified, setDataroomVerified] = useState<boolean>(false);
const [verificationToken, setVerificationToken] = useState<string | null>(
token ?? null,
);
@@ -151,7 +150,6 @@ export default function DataroomDocumentView({
userId: userId ?? null,
documentVersionId: link.dataroomDocument.document.versions[0].id,
hasPages: link.dataroomDocument.document.versions[0].hasPages,
- dataroomVerified: dataroomVerified,
dataroomId: link.dataroomId,
linkType: "DATAROOM_LINK",
dataroomViewId: viewData.dataroomViewId ?? null,
@@ -251,7 +249,6 @@ export default function DataroomDocumentView({
setVerificationToken(null);
setCode(null);
setIsInvalidCode(true);
- setDataroomVerified(false);
}
setIsLoading(false);
}