X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=ca322e0c9efbadc693cb03b08a612d141750b207;hb=28b32b4fc7c23b1c72bed68e1897576c5be46c3d;hp=ac15324c213496e646701424795755a2fe605b44;hpb=09d375717c256a2cbd71a5d3b3a4e21aee17c0ec;p=vchess.git diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue index ac15324c..ca322e0c 100644 --- a/client/src/components/UpsertUser.vue +++ b/client/src/components/UpsertUser.vue @@ -142,7 +142,7 @@ export default { case "Login": return "Connection token sent. Check your emails!"; case "Register": - return "Registration complete! Please check your emails"; + return "Registration complete! Please check your emails now"; case "Update": return "Modifications applied!"; } @@ -165,21 +165,26 @@ export default { ajax( this.ajaxUrl(), this.ajaxMethod(), - this.stage == "Login" - ? { nameOrEmail: this.nameOrEmail } - : this.user, - () => { - this.infoMsg = this.infoMessage(); - if (this.stage != "Update") this.nameOrEmail = ""; - else { - this.st.user.name = this.user.name; - this.st.user.email = this.user.email; - this.st.user.notify = this.user.notify; + { + credentials: true, + data: ( + this.stage == "Login" + ? { nameOrEmail: this.nameOrEmail } + : this.user + ), + success: () => { + this.infoMsg = this.infoMessage(); + if (this.stage != "Update") this.nameOrEmail = ""; + else { + this.st.user.name = this.user.name; + this.st.user.email = this.user.email; + this.st.user.notify = this.user.notify; + } + }, + error: (err) => { + this.infoMsg = ""; + alert(err); } - }, - err => { - this.infoMsg = ""; - alert(err); } ); },