Skip to content

Commit 2f43b5b

Browse files
committed
Update page.tsx
1 parent d067fbb commit 2f43b5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/web/app/s/[videoId]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export default async function ShareVideoPage(props: Props) {
289289
sharedOrganization: {
290290
organizationId: sharedVideos.organizationId,
291291
},
292-
ownerIsPro: sql<number>`IF(${users.stripeSubscriptionStatus} IN ('active','trialing') OR ${users.thirdPartyStripeSubscriptionId} IS NOT NULL, 1, 0)`,
292+
ownerIsPro: sql<number>`IF(${users.stripeSubscriptionStatus} IN ('active','trialing','complete','paid') OR ${users.thirdPartyStripeSubscriptionId} IS NOT NULL, 1, 0)`,
293293
})
294294
.from(videos)
295295
.leftJoin(sharedVideos, eq(videos.id, sharedVideos.videoId))
@@ -441,7 +441,7 @@ async function AuthorizedContent({
441441
id: videos.id,
442442
name: videos.name,
443443
ownerId: videos.ownerId,
444-
ownerIsPro: sql<number>`IF(${users.stripeSubscriptionStatus} IN ('active','trialing') OR ${users.thirdPartyStripeSubscriptionId} IS NOT NULL, 1, 0)`,
444+
ownerIsPro: sql<number>`IF(${users.stripeSubscriptionStatus} IN ('active','trialing','complete','paid') OR ${users.thirdPartyStripeSubscriptionId} IS NOT NULL, 1, 0)`,
445445
createdAt: videos.createdAt,
446446
updatedAt: videos.updatedAt,
447447
awsRegion: videos.awsRegion,
@@ -652,8 +652,8 @@ async function AuthorizedContent({
652652

653653
const videoWithOrganizationInfo: VideoWithOrganization = {
654654
...video,
655-
hasPassword: video.hasPassword === 1,
656-
ownerIsPro: video.ownerIsPro === 1,
655+
hasPassword: Number(video.hasPassword) === 1,
656+
ownerIsPro: Number(video.ownerIsPro) === 1,
657657
organizationMembers: membersList.map((member) => member.userId),
658658
organizationId: video.sharedOrganization?.organizationId ?? undefined,
659659
sharedOrganizations: sharedOrganizations,

0 commit comments

Comments
 (0)