Skip to content

Commit

Permalink
update captcha after error on signup
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Dec 12, 2023
1 parent bfbba79 commit ea8b6a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/js/components/pages/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
};
},
mounted: function() {
signup_captcha().then(c => this.captcha_id = c);
this.update_captcha();
},
components: {
"default-layout": DefaultLayout
Expand All @@ -32,6 +32,9 @@ export default {
}
},
methods: {
update_captcha: function() {
signup_captcha().then(c => this.captcha_id = c);
},
create_user: function(){
this.busy = true;
this.error_message = "";
Expand All @@ -45,6 +48,7 @@ export default {
this.busy = false;
if (err_msg) {
this.error_message = err_msg;
this.update_captcha();
} else {
login(this.username, this.password)
.then(() => this.$router.push("/profile"));
Expand Down

0 comments on commit ea8b6a5

Please sign in to comment.