push crisp

This commit is contained in:
omair saleh
2022-04-25 15:17:30 +08:00
parent 8678ac7b5e
commit 474caac039
+13 -13
View File
@@ -50,19 +50,19 @@ const app = new Vue({
store,
created(){
this.routesGuard();
if (!('company_marking' in this.$store.getters.getDecodedAccessToken.user) && this.isProtectedRoute()) {
this.$store.dispatch('crudRequest', {endpoint: this.route('api.account.authentication.refresh'), method: 'get'}).then(response => {
let success = response.ok;
response.json().then(response => {
if(!success){return;}
this.$store.dispatch('userAuthentication', {access_token: response.payload.refresh_token, redirect_url: window.location.href});
});
})
}
// if (!('company_marking' in this.$store.getters.getDecodedAccessToken.user) && this.isProtectedRoute()) {
// this.$store.dispatch('crudRequest', {endpoint: this.route('api.account.authentication.refresh'), method: 'get'}).then(response => {
// let success = response.ok;
// response.json().then(response => {
//
// if(!success){return;}
//
// this.$store.dispatch('userAuthentication', {access_token: response.payload.refresh_token, redirect_url: window.location.href});
//
// });
// })
//
// }
},
methods: {
route: route