api bugfix
This commit is contained in:
parent
bb22a17baf
commit
2066fd69f2
|
@ -317,14 +317,21 @@ export class CommonApiService {
|
|||
public translationSave(
|
||||
req: TranslationSaveRequest
|
||||
): Observable<TranslationSaveResponse> {
|
||||
return this.httpClient
|
||||
.post<any>(
|
||||
this.urls.translationSave,
|
||||
{},
|
||||
{
|
||||
params: encodeTranslationSave(req)
|
||||
const httpReq = new HttpRequest(
|
||||
'POST',
|
||||
this.urls.translationSave,
|
||||
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))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user