Skip to content

Commit

Permalink
♻️ Removed the !assetId check and properly calling the videoUrl action
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-SO committed Aug 10, 2024
1 parent a32cc71 commit b6fa800
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/app/app/[organization]/watch/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ export default async function Watch({
}

if (!searchParams.session) return notFound();

const session = await fetchSession({
session: searchParams.session,
});

if (!session || (!session.playbackId && !session.assetId)) return notFound();
if (!session || !session.playbackId) return notFound();

const videoUrl = await getVideoUrlAction(session.assetId as string);
const videoUrl = await getVideoUrlAction(
session.assetId || session.playbackId
);

if (!videoUrl) {
return notFound();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const EditSession = async ({ params, searchParams }: studioPageParams) => {
session: params.session,
});

if (!session || (!session.playbackId && !session.assetId)) return notFound();
if (!session || !session.playbackId) return notFound();

const videoUrl = await getVideoUrlAction(session.assetId as string);

Expand Down

0 comments on commit b6fa800

Please sign in to comment.