From 871147f2d99cb71b08fd9e9167a28dd5198ddd91 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 6 Jun 2018 22:18:43 -0700 Subject: [PATCH] Remove old storage --- resources/assets/scripts/_store.js | 38 ------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 resources/assets/scripts/_store.js diff --git a/resources/assets/scripts/_store.js b/resources/assets/scripts/_store.js deleted file mode 100644 index f49ffebcb..000000000 --- a/resources/assets/scripts/_store.js +++ /dev/null @@ -1,38 +0,0 @@ -import { User } from './models/user'; - -export const storeData = { - state: { - user: null, - }, - actions: { - login: function ({ commit }) { - commit('login'); - }, - logout: function ({ commit }) { - commit('logout'); - }, - }, - getters: { - getCurrentUser: function (state) { - if (!(state.user instanceof User)) { - state.user = User.fromJWT(localStorage.getItem('token')); - } - - return state.user; - }, - }, - mutations: { - /** - * Log in a user and store them in vuex using the local storage token. - * - * @param state - */ - login: function (state) { - state.user = User.fromJWT(localStorage.getItem('token')); - }, - logout: function (state) { - console.log('logout'); - state.user = null; - } - } -};