test: test route for response test
This commit is contained in:
@@ -86,6 +86,28 @@ router.get('/', async (ctx) => {
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/test', (ctx) => {
|
||||
ctx.state.data = {
|
||||
title: 'DIYgod',
|
||||
link: 'https://diygod.me/',
|
||||
description: '测试路由 Test route',
|
||||
item: [
|
||||
{
|
||||
title: 'Title1',
|
||||
description: 'Item1',
|
||||
pubDate: new Date('2018-4-2').toUTCString(),
|
||||
link: 'https://diygod.me/1',
|
||||
},
|
||||
{
|
||||
title: 'Title2',
|
||||
description: 'Item2',
|
||||
pubDate: new Date('2018-4-10').toUTCString(),
|
||||
link: 'https://diygod.me/2',
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
// RSSHub
|
||||
router.get('/rsshub/rss', require('./routes/rsshub/rss'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user