From e516d4b756caee336d1fdde50042337b8d812079 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Tue, 29 Oct 2019 16:53:25 +0900 Subject: [PATCH] optional urls are added --- .../src/lib/services/common-api.service.ts | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 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 bbd7b547..6d0b0e29 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 @@ -75,11 +75,14 @@ export class CommonApiService { ) {} public fileProfileSave( - req: FileProfileSaveRequest + req: FileProfileSaveRequest, + fileProfileSaveUrl?: string ): Observable { return this.httpClient .post( - this.moduleConfig.urls.fileProfileSave, + !!fileProfileSaveUrl + ? fileProfileSaveUrl + : this.moduleConfig.urls.fileProfileSave, {}, { params: encodeFileProfileSave(req) @@ -88,9 +91,14 @@ export class CommonApiService { .pipe(map(res => decodeFileProfileSave(res))); } - public fileTalkDownload(req: FileTalkDownloadRequest): Observable { + public fileTalkDownload( + req: FileTalkDownloadRequest, + fileTalkDownloadUrl?: string + ): Observable { return this.httpClient.post( - this.moduleConfig.urls.fileTalkDownload, + !!fileTalkDownloadUrl + ? fileTalkDownloadUrl + : this.moduleConfig.urls.fileTalkDownload, { responseType: 'blob' }, { params: encodeFileTalkDownload(req) @@ -99,11 +107,14 @@ export class CommonApiService { } public fileTalkSave( - req: FileTalkSaveRequest + req: FileTalkSaveRequest, + fileTalkSaveUrl?: string ): Observable { return this.httpClient .post( - this.moduleConfig.urls.fileTalkSave, + !!fileTalkSaveUrl + ? fileTalkSaveUrl + : this.moduleConfig.urls.fileTalkSave, {}, { params: encodeFileTalkSave(req)