From 038dfcf6dfbcc82351ce19988d2e2b7c3afc98e1 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Wed, 29 Jan 2020 10:35:26 +0900 Subject: [PATCH] bug fixed --- .../src/lib/services/common-api.service.ts | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts b/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts index 79db4fef..fe0af076 100644 --- a/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts +++ b/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts @@ -254,16 +254,22 @@ export class CommonApiService { public massTalkSave( req: MassTalkSaveRequest ): Observable { - return this.httpClient - .post( - this.urls.massTalkSave, - {}, - { - params: encodeMassTalkSave(req), - responseType: 'text' as 'json' + const httpReq = new HttpRequest( + 'POST', + this.urls.massTalkSave, + encodeMassTalkSave(req), + { reportProgress: true, responseType: 'text' as 'json' } + ); + + return this.httpClient.request(httpReq).pipe( + filter(event => { + if (event instanceof HttpResponse) { + return true; } - ) - .pipe(map(res => decodeMassTalkSave(res))); + return false; + }), + map(res => decodeMassTalkSave((res as HttpResponse).body)) + ); } public transMassTalkDownload(