Skip to content

Commit 91f4e19

Browse files
committed
make isSpaceMember a boolean
1 parent 162a876 commit 91f4e19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
159159
const userAccess = await userHasAccessToVideo(
160160
user,
161161
video,
162-
space?.isSpaceMember,
162+
!!space?.isSpaceMember,
163163
);
164164

165165
const headersList = headers();
@@ -365,7 +365,7 @@ export default async function ShareVideoPage(props: Props) {
365365
const userAccess = await userHasAccessToVideo(
366366
user,
367367
video,
368-
space?.isSpaceMember,
368+
!!space?.isSpaceMember,
369369
);
370370

371371
if (userAccess === "private") {

apps/web/utils/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function userHasAccessToVideo(
2222
spaceId: string | null;
2323
sharedOrganization: null | { organizationId: string | null };
2424
},
25-
isSpaceMember?: string,
25+
isSpaceMember?: boolean,
2626
): Promise<"has-access" | "private" | "needs-password" | "not-org-email"> {
2727
if (video.public && video.password === null) return "has-access";
2828

0 commit comments

Comments
 (0)