Skip to content

Commit

Permalink
OV-00: + logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Sep 28, 2024
1 parent 7ffed9f commit 1f234fb
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions backend/src/bundles/public-video/public-video.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ class PublicVideoService {
this.videoRepository = videoRepository;
}

public async findUrlByToken(token: string): Promise<string> {
const id = await tokenService.getIdFromToken(token);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public async findUrlByToken(token: any): Promise<string> {
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();
Expand Down

0 comments on commit 1f234fb

Please sign in to comment.