MCPcopy Index your code
hub / github.com/pythonstock/stock / logout

Function logout

frontend/src/store/modules/user.js:68–79  ·  view source on GitHub ↗
({ commit, state })

Source from the content-addressed store, hash-verified

66
67 // user logout
68 logout({ commit, state }) {
69 return new Promise((resolve, reject) => {
70 logout(state.token).then(() => {
71 removeToken() // must remove token first
72 resetRouter()
73 commit('RESET_STATE')
74 resolve()
75 }).catch(error => {
76 reject(error)
77 })
78 })
79 },
80
81 // remove token
82 resetToken({ commit }) {

Callers

nothing calls this directly

Calls 3

removeTokenFunction · 0.90
resetRouterFunction · 0.90
resolveFunction · 0.85

Tested by

no test coverage detected