From ad2431367c793b450100c9518eb3dce79224976f Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 28 Nov 2021 07:31:59 +0800 Subject: [PATCH] feat(route): change wsyu to v2 (#8594) --- lib/router.js | 3 --- lib/v2/wsyu/maintainer.js | 3 +++ lib/{routes/universities => v2}/wsyu/news.js | 0 lib/v2/wsyu/radar.js | 25 ++++++++++++++++++++ lib/v2/wsyu/router.js | 3 +++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 lib/v2/wsyu/maintainer.js rename lib/{routes/universities => v2}/wsyu/news.js (100%) create mode 100644 lib/v2/wsyu/radar.js create mode 100644 lib/v2/wsyu/router.js diff --git a/lib/router.js b/lib/router.js index 058b1bfc9..1cc988798 100644 --- a/lib/router.js +++ b/lib/router.js @@ -2769,9 +2769,6 @@ router.get('/eastmoney/user/:uid', lazyloadRouteHandler('./routes/eastmoney/user router.get('/ssmh', lazyloadRouteHandler('./routes/ssmh')); router.get('/ssmh/category/:cid', lazyloadRouteHandler('./routes/ssmh/category')); -// 武昌首义学院 -router.get('/wsyu/news/:type?', lazyloadRouteHandler('./routes/universities/wsyu/news')); - // 华南师范大学研究生学院 router.get('/scnuyjs', lazyloadRouteHandler('./routes/universities/scnu/scnuyjs')); diff --git a/lib/v2/wsyu/maintainer.js b/lib/v2/wsyu/maintainer.js new file mode 100644 index 000000000..a5098aa71 --- /dev/null +++ b/lib/v2/wsyu/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/news/:type?': ['Derekmini'], +}; diff --git a/lib/routes/universities/wsyu/news.js b/lib/v2/wsyu/news.js similarity index 100% rename from lib/routes/universities/wsyu/news.js rename to lib/v2/wsyu/news.js diff --git a/lib/v2/wsyu/radar.js b/lib/v2/wsyu/radar.js new file mode 100644 index 000000000..cdc6cf565 --- /dev/null +++ b/lib/v2/wsyu/radar.js @@ -0,0 +1,25 @@ +module.exports = { + 'wsyu.edu.cn': { + _name: '新闻中心', + www: [ + { + title: '学校要闻', + docs: 'https://docs.rsshub.app/other.html#wu-chang-shou-yi-xue-yuan', + source: '/*', + target: '/wsyu/news/xxyw', + }, + { + title: '综合新闻', + docs: 'https://docs.rsshub.app/other.html#wu-chang-shou-yi-xue-yuan', + source: '/*', + target: '/wsyu/news/zhxw', + }, + { + title: '媒体聚焦', + docs: 'https://docs.rsshub.app/other.html#wu-chang-shou-yi-xue-yuan', + source: '/*', + target: '/wsyu/news/mtjj', + }, + ], + }, +}; diff --git a/lib/v2/wsyu/router.js b/lib/v2/wsyu/router.js new file mode 100644 index 000000000..c36fd4f1c --- /dev/null +++ b/lib/v2/wsyu/router.js @@ -0,0 +1,3 @@ +module.exports = function (router) { + router.get('/news/:type?', require('./news')); +};