+ routers() in route index
This commit is contained in:
1 parent
c6c8326f88
commit
5c2ca6f73e
1 file changed
+29
-2
+29
-2
@@ -1,8 +1,35 @@
|
|||||||
import path from 'path';
|
|
||||||
import fs from 'mz/fs';
|
import fs from 'mz/fs';
|
||||||
import config from '../config';
|
import route from 'koa-route';
|
||||||
|
|
||||||
import {map, assign} from '../utils/common';
|
import {map, assign} from '../utils/common';
|
||||||
|
import config from '../config';
|
||||||
|
|
||||||
|
import sitemap from './sitemap';
|
||||||
|
import schedule from './schedule';
|
||||||
|
import news from './news';
|
||||||
|
import gallery from './gallery';
|
||||||
|
import error404 from './404';
|
||||||
|
import documents from './documents';
|
||||||
|
import teachers from './teachers';
|
||||||
|
import events from './events';
|
||||||
|
import articles from './articles';
|
||||||
|
|
||||||
|
let main = () => route.get('/', index());
|
||||||
|
|
||||||
|
export function routes(app){
|
||||||
|
app.use(main());
|
||||||
|
|
||||||
|
sitemap(app);
|
||||||
|
schedule(app);
|
||||||
|
news(app);
|
||||||
|
gallery(app);
|
||||||
|
documents(app);
|
||||||
|
events(app);
|
||||||
|
articles(app);
|
||||||
|
teachers(app);
|
||||||
|
|
||||||
|
app.use(error404());
|
||||||
|
}
|
||||||
|
|
||||||
export function queryObject() {
|
export function queryObject() {
|
||||||
let toTrue = map(true, i => i === 'true');
|
let toTrue = map(true, i => i === 'true');
|
||||||
|
|||||||
Reference in new issue
Block a user