mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 02:06:18 +01:00
Removed unnecessary catch
This commit is contained in:
@@ -12,8 +12,5 @@ export function changePassword(
|
|||||||
.put(url, { oldPassword, newPassword }, CONTENT_TYPE_PASSWORD_CHANGE)
|
.put(url, { oldPassword, newPassword }, CONTENT_TYPE_PASSWORD_CHANGE)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return response;
|
return response;
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
return { error: err };
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import { apiClient } from "@scm-manager/ui-components";
|
import { apiClient } from "@scm-manager/ui-components";
|
||||||
|
|
||||||
export const CONTENT_TYPE_PASSWORD_OVERWRITE =
|
export const CONTENT_TYPE_PASSWORD_OVERWRITE =
|
||||||
"application/vnd.scmm-passwordOverwrite+json;v=2";
|
"application/vnd.scmm-passwordOverwrite+json;v=2";
|
||||||
|
|
||||||
@@ -8,8 +9,5 @@ export function setPassword(url: string, password: string) {
|
|||||||
.put(url, { newPassword: password }, CONTENT_TYPE_PASSWORD_OVERWRITE)
|
.put(url, { newPassword: password }, CONTENT_TYPE_PASSWORD_OVERWRITE)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return response;
|
return response;
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
return { error: err };
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user