mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
* wip: vuex structure * add missing files * client: do not fail dev build on eslint error * eslint does not block compilation, mount app when data is ready * eslintrc.js -> eslintrc
15 lines
293 B
JavaScript
15 lines
293 B
JavaScript
import Vue from 'vue';
|
|
|
|
export function setTitle (store, title) {
|
|
store.commit('SET_TITLE', title);
|
|
}
|
|
|
|
export function fetchUser (store) {
|
|
let promise = Vue.http.get('/api/v3/user');
|
|
|
|
promise.then(response => {
|
|
store.commit('SET_USER', response.body.data);
|
|
});
|
|
|
|
return promise;
|
|
} |