diff --git a/apps/trackflix/src/api/StrapiApi.ts b/apps/trackflix/src/api/StrapiApi.ts index a893601..0406384 100644 --- a/apps/trackflix/src/api/StrapiApi.ts +++ b/apps/trackflix/src/api/StrapiApi.ts @@ -123,8 +123,6 @@ export class StrapiApi implements IApi { }, }).then((res) => res.json()) - console.log(response) - const video = response.data if (!video) return null return this.strapiMediaToVideoOnDemand(video) diff --git a/apps/trackflix/src/pages/video/[id].tsx b/apps/trackflix/src/pages/video/[id].tsx index 2edf0f8..33b6d8a 100644 --- a/apps/trackflix/src/pages/video/[id].tsx +++ b/apps/trackflix/src/pages/video/[id].tsx @@ -161,7 +161,7 @@ const VideoPage = (props: PageProps) => { videoNode?.addEventListener( 'play', () => { - if (asset?.media?.id && asset?.media?.viewCount) { + if (asset?.media?.id && asset?.media?.viewCount !== undefined) { api.updateAsset(asset?.media?.id, { views: asset?.media?.viewCount + 1 || 1, })