Skip to content
Snippets Groups Projects
Commit f739b344 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

delete adminlist on logout

parent 3207eed3
No related branches found
No related tags found
1 merge request!144remove console log, change route to community home after creation, add admin...
...@@ -6,6 +6,7 @@ const state = { ...@@ -6,6 +6,7 @@ const state = {
const mutations = { const mutations = {
logout(state) { logout(state) {
state.token = null; state.token = null;
state.adminList = [];
}, },
saveToken(state, token) { saveToken(state, token) {
state.token = token; state.token = token;
...@@ -18,6 +19,10 @@ const mutations = { ...@@ -18,6 +19,10 @@ const mutations = {
state.adminList.push(communityIDArray[i]); state.adminList.push(communityIDArray[i]);
} }
}, },
addAdmin(state, communityID) {
if (!Number(communityID)) return;
state.adminList.push(communityID);
}
}; };
export default { export default {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment