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

Function getInfo

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

Source from the content-addressed store, hash-verified

45
46 // get user info
47 getInfo({ commit, state }) {
48 return new Promise((resolve, reject) => {
49 getInfo(state.token).then(response => {
50 const { data } = response
51
52 if (!data) {
53 return reject('Verification failed, please Login again.')
54 }
55
56 const { name, avatar } = data
57
58 commit('SET_NAME', name)
59 commit('SET_AVATAR', avatar)
60 resolve(data)
61 }).catch(error => {
62 reject(error)
63 })
64 })
65 },
66
67 // user logout
68 logout({ commit, state }) {

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected