Files
SCM-Manager/scm-ui/src/users/components/updatePassword.js

15 lines
398 B
JavaScript
Raw Normal View History

2018-11-05 16:14:54 +01:00
//@flow
import { apiClient } from "@scm-manager/ui-components";
const CONTENT_TYPE_USER = "application/vnd.scmm-passwordOverwrite+json;v=2";
export function updatePassword(url: string, password: string) {
return apiClient
.put(url, { newPassword: password }, CONTENT_TYPE_USER)
.then(response => {
2018-11-05 16:28:46 +01:00
return response;
2018-11-05 16:14:54 +01:00
})
.catch(err => {
return { error: err };
});
}