From 1f234fb30120e93239dda7fae5835b0ead3e0cf2 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 13:16:45 +0300 Subject: [PATCH] OV-00: + logs --- .../public-video/public-video.service.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/backend/src/bundles/public-video/public-video.service.ts b/backend/src/bundles/public-video/public-video.service.ts index 018cd2006..05e4640ce 100644 --- a/backend/src/bundles/public-video/public-video.service.ts +++ b/backend/src/bundles/public-video/public-video.service.ts @@ -10,8 +10,21 @@ class PublicVideoService { this.videoRepository = videoRepository; } - public async findUrlByToken(token: string): Promise { - const id = await tokenService.getIdFromToken(token); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public async findUrlByToken(token: any): Promise { + let id; + + // eslint-disable-next-line no-console + console.log(token, 'find url by token'); + if (token.id) { + id = token.id; + // eslint-disable-next-line no-console + console.log('id from token', id); + } else { + id = await tokenService.getIdFromToken(token); + // eslint-disable-next-line no-console + console.log('id from else', id); + } if (!id) { this.throwVideoNotFoundError();