Skip to content

Commit

Permalink
AMP-3079: fix bug in activation msg
Browse files Browse the repository at this point in the history
  • Loading branch information
yingfeng-iu committed Jul 1, 2024
1 parent 313f169 commit 9e9500e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/components/account/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,24 @@ export default {
this.loading = true;
await this.activateNewUser();
this.loading = false;
console.log("activation result is:" + this.activate_status);
console.log("activation status:" + this.activate_status);
console.log("activation errors:" + this.errors.other_errors);
}
},
methods: {
activateNewUser() {
async activateNewUser() {
let self = this;
accountService
.sendActivateUserRequest(this.token)
.then((response) => {
self.activate_status = response.success;
if (self.activate_status)
self.errors.other_errors = "Your account has been successfully activated. You may now login.";
else
self.errors.other_errors = response.errors;
})
.catch((e) => {
try {
let response = await accountService.sendActivateUserRequest(this.token);
self.activate_status = response.success;
if (self.activate_status)
self.errors.other_errors[0] = "Your account has been successfully activated. You may now login.";
else
self.errors.other_errors = response.errors;
}
catch(e) {
console.log(e);
});
}
},
async checkForm() {
event.preventDefault();
Expand Down

0 comments on commit 9e9500e

Please sign in to comment.