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

make sure setSettings returns expected info

parent 91f19b94
No related branches found
No related tags found
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