fix(route): Vice component role fix (#15737)
* Removes deprecated parameter documentation * Fixes archaic component role structure
This commit is contained in:
parent
0e1d1a48b5
commit
07c72b1d26
|
|
@ -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('');
|
||||
|
|
|
|||
Loading…
Reference in New Issue