aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/rest
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-07 11:06:28 +0200
committerChocobozzz <me@florianbigard.com>2022-10-07 11:06:28 +0200
commitd12b40fb96d56786a96c06a621f3d8e0a0d24f4a (patch)
tree7047fa5cd7e778eb377c897eccb539c52b2e59bc /client/src/app/core/rest
parent56f47830758ff8e92abcfcc5f35d474ab12fe215 (diff)
downloadPeerTube-d12b40fb96d56786a96c06a621f3d8e0a0d24f4a.tar.gz
PeerTube-d12b40fb96d56786a96c06a621f3d8e0a0d24f4a.tar.zst
PeerTube-d12b40fb96d56786a96c06a621f3d8e0a0d24f4a.zip
Implement two factor in client
Diffstat (limited to 'client/src/app/core/rest')
-rw-r--r--client/src/app/core/rest/rest-extractor.service.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/core/rest/rest-extractor.service.ts b/client/src/app/core/rest/rest-extractor.service.ts
index 7eec2eca6..57dd9ae26 100644
--- a/client/src/app/core/rest/rest-extractor.service.ts
+++ b/client/src/app/core/rest/rest-extractor.service.ts
@@ -4,6 +4,7 @@ import { Router } from '@angular/router'
4import { DateFormat, dateToHuman } from '@app/helpers' 4import { DateFormat, dateToHuman } from '@app/helpers'
5import { logger } from '@root-helpers/logger' 5import { logger } from '@root-helpers/logger'
6import { HttpStatusCode, ResultList } from '@shared/models' 6import { HttpStatusCode, ResultList } from '@shared/models'
7import { HttpHeaderResponse } from '@angular/common/http'
7 8
8@Injectable() 9@Injectable()
9export class RestExtractor { 10export class RestExtractor {
@@ -54,10 +55,11 @@ export class RestExtractor {
54 handleError (err: any) { 55 handleError (err: any) {
55 const errorMessage = this.buildErrorMessage(err) 56 const errorMessage = this.buildErrorMessage(err)
56 57
57 const errorObj: { message: string, status: string, body: string } = { 58 const errorObj: { message: string, status: string, body: string, headers: HttpHeaderResponse } = {
58 message: errorMessage, 59 message: errorMessage,
59 status: undefined, 60 status: undefined,
60 body: undefined 61 body: undefined,
62 headers: err.headers
61 } 63 }
62 64
63 if (err.status) { 65 if (err.status) {