mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 20:27:52 +08:00
test: middleware/template
This commit is contained in:
@@ -91,10 +91,19 @@ router.get('/test/:id', (ctx) => {
|
||||
throw Error('Error test');
|
||||
}
|
||||
const item = [];
|
||||
if (ctx.params.id === 'long') {
|
||||
item.push({
|
||||
title: `Long Title `.repeat(10),
|
||||
description: `Long Description `.repeat(10),
|
||||
pubDate: new Date(`2018-3-1`).toUTCString(),
|
||||
link: `https://github.com/DIYgod/RSSHub/issues/0`,
|
||||
author: `DIYgod0`,
|
||||
});
|
||||
}
|
||||
for (let i = 1; i < 6; i++) {
|
||||
item.push({
|
||||
title: `Title${i}`,
|
||||
description: `Item${i}`,
|
||||
description: `Description${i}`,
|
||||
pubDate: new Date(`2018-4-${i}`).toUTCString(),
|
||||
link: `https://github.com/DIYgod/RSSHub/issues/${i}`,
|
||||
author: `DIYgod${i}`,
|
||||
|
||||
Reference in New Issue
Block a user