show error and loading state

This commit is contained in:
Maren Süwer
2018-11-05 16:28:46 +01:00
parent c6bc385b2f
commit 3c63d994c6
2 changed files with 41 additions and 22 deletions

View File

@@ -6,9 +6,7 @@ export function updatePassword(url: string, password: string) {
return apiClient
.put(url, { newPassword: password }, CONTENT_TYPE_USER)
.then(response => {
return {
status: response.status
};
return response;
})
.catch(err => {
return { error: err };