Skip to content
Snippets Groups Projects
Commit fae8fe0c authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

Merge branch 'fix-settings-errors' into 'release/2.4.3-rc1'

make sure setSettings returns expected info

See merge request !24
parents 91f19b94 2ab8beef
No related branches found
Tags 2.0.0
2 merge requests!25Merge 2.4.3 UI to main,!24make sure setSettings returns expected info
......@@ -23,7 +23,12 @@ export class SettingsService {
public setSettings(settings: Setting): Observable<Setting> {
return this.http.post<Setting>(this.configService.config.url + '/services/settings', settings, {observe: "response"}).pipe(
map(response => {
return response.body;
if (response.status === 204) {
// this is a post which returns nothing, can't use response.body
return settings;
}
// if for some completely weird reason, we do have response content, send it on, it's probably an error
return response.body
}));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment