Implemented move event pusher
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-06 03:08:02 +01:00
parent 969ffcfb0c
commit f7b5dc41ca
3 changed files with 63 additions and 9 deletions

View File

@@ -19,6 +19,8 @@ import {
MdRipple,
MdDialog,
MdSpeedDial,
MdDivider,
MdSubheader
} from 'vue-material/dist/components'
import 'vue-material/dist/vue-material.min.css'
@@ -40,6 +42,8 @@ Vue.use(MdAvatar);
Vue.use(MdRipple);
Vue.use(MdDialog);
Vue.use(MdSpeedDial);
Vue.use(MdDivider);
Vue.use(MdSubheader);
Vue.prototype.$api = axios.create({
baseURL: process.env.VUE_APP_API_LOCATION
@@ -61,9 +65,10 @@ new Vue({
});
});
this.$api.interceptors.request.use((config) => {
if (this.$store && this.$store.getters.isLoggedIn) {
if (this.$store && this.$store.getters["auth/isLoggedIn"]) {
config.headers["Authorization"] = "Bearer " + this.$store.state.auth.token;
}
return config;
})
}
}).$mount('#app')