You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
461 B
TypeScript
17 lines
461 B
TypeScript
import Router from "@koa/router";
|
|
import { Middlewares } from "sealious";
|
|
import { MainView } from "./common/main-view";
|
|
import { loginRouter } from "./login/login.routes";
|
|
import mountAutoRoutes from "./routes";
|
|
|
|
export const mainRouter = (router: Router): void => {
|
|
router.get("/", Middlewares.extractContext(), async (ctx) => {
|
|
ctx.body = MainView(ctx);
|
|
});
|
|
|
|
router.use(Middlewares.extractContext());
|
|
|
|
loginRouter(router);
|
|
mountAutoRoutes(router);
|
|
};
|