2019-06-23 06:25:38 +00:00
|
|
|
import http from '@/api/http';
|
|
|
|
|
|
|
|
interface Data {
|
|
|
|
current: string;
|
|
|
|
password: string;
|
|
|
|
confirmPassword: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ({ current, password, confirmPassword }: Data): Promise<void> => {
|
|
|
|
return new Promise((resolve, reject) => {
|
2019-06-23 06:45:09 +00:00
|
|
|
http.put('/api/client/account/password', {
|
2019-06-23 06:25:38 +00:00
|
|
|
current_password: current,
|
|
|
|
password: password,
|
|
|
|
password_confirmation: confirmPassword,
|
|
|
|
})
|
|
|
|
.then(() => resolve())
|
|
|
|
.catch(reject);
|
|
|
|
});
|
|
|
|
};
|