14 lines
282 B
JavaScript
14 lines
282 B
JavaScript
export default async function() {
|
|
const { store } = this.context
|
|
|
|
try {
|
|
const response = await this.callApi('/api/userinfo')
|
|
store.commit('engine/setUser', response.data)
|
|
} catch(e) {
|
|
store.commit('engine/setUser', undefined)
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|