X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=ca322e0c9efbadc693cb03b08a612d141750b207;hb=e57c4de4148d43e7635e09adcde4e56585aea303;hp=2be637c678d0c52331779dcde795f4d40587ca32;hpb=f0c68a04e31bb6a4b2f8b94a532ef3ca2eebbe3e;p=vchess.git diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue index 2be637c6..ca322e0c 100644 --- a/client/src/components/UpsertUser.vue +++ b/client/src/components/UpsertUser.vue @@ -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); } ); },