From 3a3785de5bf7200757627b3cb12f360941f0f3f6 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Fri, 24 Feb 2023 17:04:37 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20remove=20document=20data?= =?UTF-8?q?=20from=20serverside=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/pages/documents/[id]/index.tsx | 2 +- apps/web/pages/documents/[id]/recipients.tsx | 2 +- apps/web/pages/documents/[id]/sign.tsx | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) 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()