mirror of
https://github.com/r-ca/kidshift-web.git
synced 2024-10-26 00:34:01 +00:00
actions
This commit is contained in:
parent
7fd2de6d77
commit
a72f491818
|
@ -1,10 +1,12 @@
|
||||||
import { ActionTree } from 'vuex';
|
import { ActionTree } from 'vuex';
|
||||||
import { StateInterface } from '../index';
|
import { StateInterface } from '../index';
|
||||||
import { ExampleStateInterface } from './state';
|
import { AccountStateInterface } from './state';
|
||||||
|
|
||||||
const actions: ActionTree<ExampleStateInterface, StateInterface> = {
|
const actions: ActionTree<AccountStateInterface, StateInterface> = {
|
||||||
someAction (/* context */) {
|
logout(context) {
|
||||||
// your code
|
context.commit('setToken', '');
|
||||||
|
context.commit('setUsername', '');
|
||||||
|
context.commit('setLoggedIn', false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user