aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+search
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /client/src/app/+search
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'client/src/app/+search')
-rw-r--r--client/src/app/+search/shared/abstract-lazy-load.resolver.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
index b18a5b64d..7551d977d 100644
--- a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
@@ -1,6 +1,7 @@
1import { Observable } from 'rxjs' 1import { Observable } from 'rxjs'
2import { map } from 'rxjs/operators' 2import { map } from 'rxjs/operators'
3import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router' 3import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router'
4import { logger } from '@root-helpers/logger'
4import { ResultList } from '@shared/models' 5import { ResultList } from '@shared/models'
5 6
6export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> { 7export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> {
@@ -10,7 +11,7 @@ export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> {
10 const url = route.params.url 11 const url = route.params.url
11 12
12 if (!url) { 13 if (!url) {
13 console.error('Could not find url param.', { params: route.params }) 14 logger.error('Could not find url param.', { params: route.params })
14 return this.router.navigateByUrl('/404') 15 return this.router.navigateByUrl('/404')
15 } 16 }
16 17
@@ -18,7 +19,7 @@ export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> {
18 .pipe( 19 .pipe(
19 map(result => { 20 map(result => {
20 if (result.data.length !== 1) { 21 if (result.data.length !== 1) {
21 console.error('Cannot find result for this URL') 22 logger.error('Cannot find result for this URL')
22 return this.router.navigateByUrl('/404') 23 return this.router.navigateByUrl('/404')
23 } 24 }
24 25