X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Frest%2Frest-extractor.service.ts;h=b8a95cca63d1a6e22c9c4f965ab3a3c8e8618f67;hb=ab398a05e9ffaacb8fc713bb2ba9717ac463b34c;hp=84d9ed074d4580b1348b6b2a262f6a9dba9af6cb;hpb=6939cbac48e0a9823b34577836480ae3c28186be;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/rest/rest-extractor.service.ts b/client/src/app/core/rest/rest-extractor.service.ts index 84d9ed074..b8a95cca6 100644 --- a/client/src/app/core/rest/rest-extractor.service.ts +++ b/client/src/app/core/rest/rest-extractor.service.ts @@ -93,10 +93,10 @@ export class RestExtractor { return observableThrowError(errorObj) } - redirectTo404IfNotFound (obj: { status: number }, status = [ HttpStatusCode.NOT_FOUND_404 ]) { + redirectTo404IfNotFound (obj: { status: number }, type: 'video' | 'other', status = [ HttpStatusCode.NOT_FOUND_404 ]) { if (obj && obj.status && status.indexOf(obj.status) !== -1) { // Do not use redirectService to avoid circular dependencies - this.router.navigate([ '/404' ], { skipLocationChange: true }) + this.router.navigate([ '/404' ], { state: { type, obj }, skipLocationChange: true }) } return observableThrowError(obj)