3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 09:35:02 +00:00

Fix dashboard login redirect

This commit is contained in:
Dragory 2021-09-05 18:11:55 +03:00
parent b45280d73e
commit 32aa43cf62

View file

@ -16,8 +16,8 @@ export const authGuard: NavigationGuard = async (to, from, next) => {
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
if (to.query.apiKey) {
await RootStore.dispatch("auth/setApiKey", to.query.apiKey);
next("/dashboard");
await RootStore.dispatch("auth/setApiKey", { key: to.query.apiKey });
window.location.href = "/dashboard";
} else {
window.location.href = `/?error=noAccess`;
}