diff --git a/web/src/main.js b/web/src/main.js index b76c69e..d23f011 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -44,9 +44,9 @@ library.add(faPlus, faCheckCircle, faEdit, faTrash, faCat, faSyncAlt, faSort, fa faWindowClose, faCamera, faStop, faPen, faCheck, faTimes, faSave, faEye, faComment, faUser, faComments, faEnvelope); Vue.component('font-awesome-icon', FontAwesomeIcon); -import VueQRCodeComponent from 'vue-qrcode-component' +//import VueQRCodeComponent from 'vue-qrcode-component' -Vue.component('qr-code', VueQRCodeComponent) +//Vue.component('qr-code', VueQRCodeComponent) sync(store, router); diff --git a/web/src/store/index.js b/web/src/store/index.js index 7e40b4e..0b1a34c 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -127,6 +127,10 @@ const store = new Vuex.Store({ state.user = user; localStorage.setItem('user', user); }, + setToken(state, token) { + state.token = token; + localStorage.setItem('token', token); + }, logout(state) { state.user = null; state.token = null; @@ -145,7 +149,7 @@ const store = new Vuex.Store({ body: JSON.stringify({username: username, password: password}), credentials: 'omit' }).then(r => r.json()) - if (data.token && data.key) { + if (data.token) { commit('setToken', data.token); commit('setUser', username); axios.defaults.headers.common['Authorization'] = `Token ${data.token}`; diff --git a/web/src/views/admin/Debug.vue b/web/src/views/admin/Debug.vue index 6178183..e9f34ad 100644 --- a/web/src/views/admin/Debug.vue +++ b/web/src/views/admin/Debug.vue @@ -2,7 +2,7 @@
- +

Events