X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FAuth.vue;h=b28ac1efe9c795f294d987526a4cd0c6dbee50c4;hp=0c5afe9c6b02f50e748674cd609930f59b589253;hb=e57c4de4148d43e7635e09adcde4e56585aea303;hpb=e01e086d96f3c0f04761d269e6a34ba0b6014a56 diff --git a/client/src/views/Auth.vue b/client/src/views/Auth.vue index 0c5afe9c..b28ac1ef 100644 --- a/client/src/views/Auth.vue +++ b/client/src/views/Auth.vue @@ -21,15 +21,18 @@ export default { ajax( "/authenticate", "GET", - { token: this.$route.params["token"] }, - res => { - this.authOk = true; - this.st.user.id = res.id; - this.st.user.name = res.name; - this.st.user.email = res.email; - this.st.user.notify = res.notify; - localStorage["myname"] = res.name; - localStorage["myid"] = res.id; + { + credentials: true, + data: { token: this.$route.params["token"] }, + success: (res) => { + this.authOk = true; + this.st.user.id = res.id; + this.st.user.name = res.name; + this.st.user.email = res.email; + this.st.user.notify = res.notify; + localStorage["myname"] = res.name; + localStorage["myid"] = res.id; + } } ); }