diff --git a/backend/src/bundles/public-video/public-video.service.ts b/backend/src/bundles/public-video/public-video.service.ts index 018cd200..05e4640c 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();