make user enter current password when modifying password

This commit is contained in:
MaysWind
2020-10-31 21:39:43 +08:00
parent 91162a140a
commit 40f86e4ce6
6 changed files with 76 additions and 8 deletions
+3 -2
View File
@@ -127,11 +127,12 @@ export default {
getProfile: () => {
return axios.get('v1/users/profile/get.json');
},
updateProfile: ({ email, nickname, password }) => {
updateProfile: ({ email, nickname, password, oldPassword }) => {
return axios.post('v1/users/profile/update.json', {
email,
nickname,
password
password,
oldPassword
});
},
};