Skip to content

Commit

Permalink
Merge pull request #689 from mfts/feat/unit-pricing
Browse files Browse the repository at this point in the history
feat: disable page links on free
  • Loading branch information
mfts authored Oct 8, 2024
2 parents 65dcbf2 + 9a67cb4 commit 5d0dd22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions pages/api/views-dataroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export default async function handle(
dataroom: {
select: {
teamId: true,
team: {
select: {
plan: true,
},
},
},
},
},
Expand Down Expand Up @@ -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,
},
});
Expand Down
13 changes: 11 additions & 2 deletions pages/api/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ export default async function handle(
agreementId: true,
enableWatermark: true,
watermarkConfig: true,
document: {
select: {
team: {
select: {
plan: true,
},
},
},
},
},
});

Expand Down Expand Up @@ -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,
},
});
Expand Down

0 comments on commit 5d0dd22

Please sign in to comment.