mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 04:45:02 +00:00
dashboard: auth fixes, guild listing, config editing
This commit is contained in:
parent
1dae3019c4
commit
7bda2b1763
14 changed files with 200 additions and 42 deletions
|
@ -3,8 +3,8 @@ import VueRouter, { RouteConfig } from "vue-router";
|
|||
import Index from "./components/Index.vue";
|
||||
import Login from "./components/Login.vue";
|
||||
import LoginCallback from "./components/LoginCallback.vue";
|
||||
import GuildConfigEditor from "./components/GuildConfigEditor.vue";
|
||||
import Dashboard from "./components/Dashboard.vue";
|
||||
import store from "./store";
|
||||
import { authGuard, loginCallbackGuard } from "./auth";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
@ -15,7 +15,10 @@ const publicRoutes: RouteConfig[] = [
|
|||
{ path: "/login-callback", beforeEnter: loginCallbackGuard },
|
||||
];
|
||||
|
||||
const authenticatedRoutes: RouteConfig[] = [{ path: "/dashboard", component: Dashboard }];
|
||||
const authenticatedRoutes: RouteConfig[] = [
|
||||
{ path: "/dashboard", component: Dashboard },
|
||||
{ path: "/dashboard/guilds/:guildId/config", component: GuildConfigEditor },
|
||||
];
|
||||
|
||||
authenticatedRoutes.forEach(route => {
|
||||
route.beforeEnter = authGuard;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue