File tree 1 file changed +15
-2
lines changed
backend/src/bundles/public-video
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,21 @@ class PublicVideoService {
10
10
this . videoRepository = videoRepository ;
11
11
}
12
12
13
- public async findUrlByToken ( token : string ) : Promise < string > {
14
- const id = await tokenService . getIdFromToken ( token ) ;
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ public async findUrlByToken ( token : any ) : Promise < string > {
15
+ let id ;
16
+
17
+ // eslint-disable-next-line no-console
18
+ console . log ( token , 'find url by token' ) ;
19
+ if ( token . id ) {
20
+ id = token . id ;
21
+ // eslint-disable-next-line no-console
22
+ console . log ( 'id from token' , id ) ;
23
+ } else {
24
+ id = await tokenService . getIdFromToken ( token ) ;
25
+ // eslint-disable-next-line no-console
26
+ console . log ( 'id from else' , id ) ;
27
+ }
15
28
16
29
if ( ! id ) {
17
30
this . throwVideoNotFoundError ( ) ;
You can’t perform that action at this time.
0 commit comments