Adding request works (mostly)

Everything works except adding the new request back to the list; this
proof of concept is a go, and will be merged to master
This commit is contained in:
Daniel J. Summers
2017-09-21 18:45:06 -05:00
parent 794a365f08
commit 015645aa86
14 changed files with 179 additions and 55 deletions
+7 -5
View File
@@ -1,7 +1,9 @@
import auth0 from 'auth0-js'
import { AUTH_CONFIG } from './auth0-variables'
'use strict'
import * as types from '@/store/mutation-types'
import auth0 from 'auth0-js'
import AUTH_CONFIG from './auth0-variables'
import mutations from '@/store/mutation-types'
export default class AuthService {
@@ -64,7 +66,7 @@ export default class AuthService {
this.setSession(authResult)
this.userInfo(authResult.accessToken)
.then(user => {
store.commit(types.USER_LOGGED_ON, user)
store.commit(mutations.USER_LOGGED_ON, user)
router.replace('/dashboard')
})
}
@@ -93,7 +95,7 @@ export default class AuthService {
localStorage.removeItem('expires_at')
localStorage.setItem('user_profile', JSON.stringify({}))
// navigate to the home route
store.commit(types.USER_LOGGED_OFF)
store.commit(mutations.USER_LOGGED_OFF)
router.replace('/')
}