Add/Edit request works

No longer a modal (#20)
This commit is contained in:
Daniel J. Summers
2018-08-17 20:59:57 -05:00
parent c0dd6b5dd6
commit d3aff4a110
8 changed files with 135 additions and 85 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import actions from './action-types'
Vue.use(Vuex)
this.auth0 = new AuthService()
const auth0 = new AuthService()
const logError = function (error) {
if (error.response) {
@@ -34,11 +34,11 @@ export default new Vuex.Store({
state: {
user: JSON.parse(localStorage.getItem('user_profile') || '{}'),
isAuthenticated: (() => {
this.auth0.scheduleRenewal()
if (this.auth0.isAuthenticated()) {
auth0.scheduleRenewal()
if (auth0.isAuthenticated()) {
api.setBearer(localStorage.getItem('id_token'))
}
return this.auth0.isAuthenticated()
return auth0.isAuthenticated()
})(),
journal: {},
isLoadingJournal: false