mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(route): Vice component role fix (#15737)
* Removes deprecated parameter documentation * Fixes archaic component role structure
This commit is contained in:
@@ -16,7 +16,6 @@ export const route: Route = {
|
||||
example: '/vice/topic/politics/en',
|
||||
parameters: {
|
||||
topic: 'Can be found in the URL',
|
||||
content: 'Set to true to retrieve the full article (images are blurry), anything else will pull the short text',
|
||||
language: 'defaults to `en`, use the website to discover other codes',
|
||||
},
|
||||
radar: [
|
||||
@@ -70,9 +69,6 @@ async function handler(ctx) {
|
||||
return render({ body: { html: component.html } });
|
||||
case 'heading2':
|
||||
return render({ heading2: { html: component.html } });
|
||||
case 'article':
|
||||
case 'divider':
|
||||
return '';
|
||||
case 'image':
|
||||
return render({
|
||||
image: {
|
||||
@@ -86,7 +82,7 @@ async function handler(ctx) {
|
||||
case 'youtube':
|
||||
return render({ oembed: { html: component.oembed.html } });
|
||||
default:
|
||||
throw new Error(`Unhandled component: ${component.role} from ${item.link}`);
|
||||
return '';
|
||||
}
|
||||
})
|
||||
.join('');
|
||||
|
||||
Reference in New Issue
Block a user