api bugfix

This commit is contained in:
leejinho 2020-01-29 15:09:41 +09:00
parent bb22a17baf
commit 2066fd69f2

View File

@ -317,14 +317,21 @@ export class CommonApiService {
public translationSave(
req: TranslationSaveRequest
): Observable<TranslationSaveResponse> {
return this.httpClient
.post<any>(
const httpReq = new HttpRequest(
'POST',
this.urls.translationSave,
{},
{
params: encodeTranslationSave(req)
encodeTranslationSave(req),
{ reportProgress: true }
);
return this.httpClient.request(httpReq).pipe(
filter(event => {
if (event instanceof HttpResponse) {
return true;
}
)
.pipe(map(res => decodeTranslationSave(res)));
return false;
}),
map(res => decodeTranslationSave((res as HttpResponse<any>).body))
);
}
}