Dashboard styling; don't allow login if you have no guild perms; allow logging out
This commit is contained in:
parent
a517ca3906
commit
0f724fc9bd
9 changed files with 132 additions and 35 deletions
|
@ -35,6 +35,16 @@ export const AuthStore: Module<AuthState, RootState> = {
|
|||
localStorage.setItem("apiKey", newKey);
|
||||
commit("setApiKey", newKey);
|
||||
},
|
||||
|
||||
clearApiKey({ commit }) {
|
||||
localStorage.removeItem("apiKey");
|
||||
commit("setApiKey", null);
|
||||
},
|
||||
|
||||
async logout({ dispatch }) {
|
||||
await post("auth/logout");
|
||||
await dispatch("clearApiKey");
|
||||
},
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue