Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(route): lazyloadRouteHandler #8600

Merged
merged 2 commits into from
Nov 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -1821,9 +1821,7 @@ router.get('/aqicn/:city/:pollution?', lazyloadRouteHandler('./routes/aqicn/inde
// 猫眼电影
router.get('/maoyan/hot', lazyloadRouteHandler('./routes/maoyan/hot'));
router.get('/maoyan/upcoming', lazyloadRouteHandler('./routes/maoyan/upcoming'));
router.get('/maoyan/hot', require('./routes/maoyan/hot'));
router.get('/maoyan/upcoming', require('./routes/maoyan/upcoming'));
router.get('/maoyan/hotComplete/:orderby?/:ascOrDesc?/:top?', require('./routes/maoyan/hotComplete'));
router.get('/maoyan/hotComplete/:orderby?/:ascOrDesc?/:top?', lazyloadRouteHandler('./routes/maoyan/hotComplete'));

// cnBeta
router.get('/cnbeta', lazyloadRouteHandler('./routes/cnbeta/home'));
Expand Down Expand Up @@ -4241,8 +4239,6 @@ router.get('/sbs/chinese/:category?/:id?/:dialect?/:language?', lazyloadRouteHan
// Asian to lick
router.get('/asiantolick/:category?/:keyword?', lazyloadRouteHandler('./routes/asiantolick'));

// Deprecated: DO NOT ADD ROUTE HERE

// Research Gate
router.get('/researchgate/publications/:id', lazyloadRouteHandler('./routes/researchgate/publications'));

Expand All @@ -4254,6 +4250,9 @@ router.get('/rss3/blog', lazyloadRouteHandler('./routes/rss3/blog'));

// 星球日报
router.get('/odaily/activity', lazyloadRouteHandler('./routes/odaily/activity'));
router.get('/odaily/newsflash', lazyloadRouteHandler('./routes/odaily/newsflash'));
router.get('/odaily/user/:id', lazyloadRouteHandler('./routes/odaily/user'));
router.get('/odaily/:id?', lazyloadRouteHandler('./routes/odaily/post'));

// Fashion Network
router.get('/fashionnetwork/news/:sectors?/:categories?/:language?', lazyloadRouteHandler('./routes/fashionnetwork/news.js'));
Expand All @@ -4265,12 +4264,9 @@ router.get('/dykszx/news/:type?', lazyloadRouteHandler('./routes/dykszx/news'));
router.get('/secrss/category/:category?', lazyloadRouteHandler('./routes/secrss/category'));
router.get('/secrss/author/:author?', lazyloadRouteHandler('./routes/secrss/author'));

// 星球日报
router.get('/odaily/newsflash', require('./routes/odaily/newsflash'));
router.get('/odaily/user/:id', require('./routes/odaily/user'));
router.get('/odaily/:id?', require('./routes/odaily/post'));

// Fashion Network
router.get('/fashionnetwork/headline/:country?', require('./routes/fashionnetwork/headline.js'));
router.get('/fashionnetwork/headline/:country?', lazyloadRouteHandler('./routes/fashionnetwork/headline.js'));

// Deprecated: DO NOT ADD ROUTE HERE

module.exports = router;