From 5adf77e2f1cc3b2fbcdb1dfc3b77b386dd966c3c Mon Sep 17 00:00:00 2001 From: anton-otroshchenko Date: Sat, 28 Sep 2024 12:41:18 +0300 Subject: [PATCH] OV-0: + jwt logs --- backend/src/bundles/videos/video.service.ts | 4 ++++ .../bundles/common/api/public-video-api/public-videos-api.ts | 3 +++ frontend/src/bundles/preview/components/preview-wrapper.tsx | 2 ++ 3 files changed, 9 insertions(+) diff --git a/backend/src/bundles/videos/video.service.ts b/backend/src/bundles/videos/video.service.ts index aeffd0ef2..0f30547a2 100644 --- a/backend/src/bundles/videos/video.service.ts +++ b/backend/src/bundles/videos/video.service.ts @@ -44,6 +44,10 @@ class VideoService implements Service { public async findByUserId(userId: string): Promise { const items = await this.videoRepository.findByUserId(userId); + // eslint-disable-next-line no-console + console.log(userId); + // eslint-disable-next-line no-console + console.log(items); return { items: items.map((it) => it.toObject()), diff --git a/frontend/src/bundles/common/api/public-video-api/public-videos-api.ts b/frontend/src/bundles/common/api/public-video-api/public-videos-api.ts index 096bfb43d..373297685 100644 --- a/frontend/src/bundles/common/api/public-video-api/public-videos-api.ts +++ b/frontend/src/bundles/common/api/public-video-api/public-videos-api.ts @@ -20,6 +20,9 @@ class PublicVideosApi extends BaseHttpApi { const headers = new Headers(); headers.append('video_token', jwt.replaceAll('~', '.')); + // eslint-disable-next-line no-console + console.log('headers', headers); + const options = { method: HTTPMethod.GET, contentType: ContentType.JSON, diff --git a/frontend/src/bundles/preview/components/preview-wrapper.tsx b/frontend/src/bundles/preview/components/preview-wrapper.tsx index bfa744f70..0a1260537 100644 --- a/frontend/src/bundles/preview/components/preview-wrapper.tsx +++ b/frontend/src/bundles/preview/components/preview-wrapper.tsx @@ -4,6 +4,8 @@ import { Preview } from '~/bundles/preview/pages/preview.js'; const PreviewWrapper: React.FC = () => { const { jwt } = useParams<{ jwt: string }>(); + // eslint-disable-next-line no-console + console.log('PreviewWrapper', jwt); return ; };