Fix password

This commit is contained in:
Yukino Song
2024-08-21 23:51:22 +08:00
parent 8db50446a7
commit 68459b511d
2 changed files with 6 additions and 2 deletions

View File

@@ -89,10 +89,10 @@
},
methods: {
save() {
if (password.newPassword !== password.confirmNewPassword) {
if (this.passwordData.newPassword !== this.passwordData.confirmNewPassword) {
this.error = "Password mismatch";
return;
}
};
this.error = null;
fetch("/api/password", {
method: "POST",

View File

@@ -74,6 +74,10 @@
},
methods: {
save() {
if (this.passwordData.newPassword !== this.passwordData.confirmNewPassword) {
this.error = "Password mismatch";
return;
};
this.error = null;
this.loading = true;
fetch("/api/password", {