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)