Skip to content

The Open Source DocuSign Alternative.

⚡️ remove document data from serverside properties

Timur Ercan3a3785de5bf7
diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx
index 6098d0810..cbc34d230 100644
--- a/apps/web/pages/documents/[id]/index.tsx
+++ b/apps/web/pages/documents/[id]/index.tsx
@@ -125,7 +125,7 @@ export async function getServerSideProps(context: any) {
return {
props: {
- document: JSON.parse(JSON.stringify(document)),
+ document: JSON.parse(JSON.stringify({ ...document, document: "" })),
},
};
} catch (error) {
diff --git a/apps/web/pages/documents/[id]/recipients.tsx b/apps/web/pages/documents/[id]/recipients.tsx
index 7a0893427..25376a9dd 100644
--- a/apps/web/pages/documents/[id]/recipients.tsx
+++ b/apps/web/pages/documents/[id]/recipients.tsx
@@ -461,7 +461,7 @@ export async function getServerSideProps(context: any) {
return {
props: {
- document: JSON.parse(JSON.stringify(document)),
+ document: JSON.parse(JSON.stringify({ ...document, document: "" })),
},
};
}
diff --git a/apps/web/pages/documents/[id]/sign.tsx b/apps/web/pages/documents/[id]/sign.tsx
index e38b99e22..4b8807616 100644
--- a/apps/web/pages/documents/[id]/sign.tsx
+++ b/apps/web/pages/documents/[id]/sign.tsx
@@ -122,7 +122,9 @@ export async function getServerSideProps(context: any) {
return {
props: {
recipient: JSON.parse(JSON.stringify(recipient)),
- document: JSON.parse(JSON.stringify(recipient.Document)),
+ document: JSON.parse(
+ JSON.stringify({ ...recipient.Document, document: "" })
+ ),
fields: JSON.parse(JSON.stringify(unsignedFields)),
expired: recipient.expired
? new Date(recipient.expired) < new Date()