diff --git a/pages/api/views-dataroom.ts b/pages/api/views-dataroom.ts index 927394e4d..372f5abf9 100644 --- a/pages/api/views-dataroom.ts +++ b/pages/api/views-dataroom.ts @@ -117,6 +117,11 @@ export default async function handle( dataroom: { select: { teamId: true, + team: { + select: { + plan: true, + }, + }, }, }, }, @@ -572,8 +577,8 @@ export default async function handle( file: true, storageType: true, pageNumber: true, - embeddedLinks: true, - pageLinks: true, + embeddedLinks: !link.dataroom?.team.plan.includes("free"), + pageLinks: !link.dataroom?.team.plan.includes("free"), metadata: true, }, }); diff --git a/pages/api/views.ts b/pages/api/views.ts index 645f8ecaf..639222f8a 100644 --- a/pages/api/views.ts +++ b/pages/api/views.ts @@ -95,6 +95,15 @@ export default async function handle( agreementId: true, enableWatermark: true, watermarkConfig: true, + document: { + select: { + team: { + select: { + plan: true, + }, + }, + }, + }, }, }); @@ -419,8 +428,8 @@ export default async function handle( file: true, storageType: true, pageNumber: true, - embeddedLinks: true, - pageLinks: true, + embeddedLinks: !link.document?.team.plan.includes("free"), + pageLinks: !link.document?.team.plan.includes("free"), metadata: true, }, });