mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-18 14:29:01 +08:00
fccb91838d
* fix(route): 央视新闻-专题 支持获取Author字段 * refactor: migrate to v2 * fix: date parsing in /cctv/photo/jx * fix: special date parsing fix: xwlb not working fix: mzzlbg item description fix: news use https fix: xinwen1j1 not working * feat: add radar Co-authored-by: Alex Liu <yuxinliu.alex@gmail.com>
21 lines
601 B
JavaScript
21 lines
601 B
JavaScript
module.exports = async (ctx) => {
|
|
const { category } = ctx.params;
|
|
let responseData;
|
|
|
|
if (category === 'mzzlbg') {
|
|
// 每周质量报告
|
|
const getMzzlbg = require('./utils/mzzlbg');
|
|
responseData = await getMzzlbg();
|
|
} else if (category === 'xinwen1j1') {
|
|
// 新闻1+1
|
|
const xinwen1j1 = require('./utils/xinwen1j1');
|
|
responseData = await xinwen1j1(ctx);
|
|
} else {
|
|
// 央视新闻
|
|
const getNews = require('./utils/news');
|
|
responseData = await getNews(category, ctx);
|
|
}
|
|
|
|
ctx.state.data = responseData;
|
|
};
|