From 07c72b1d265fdc66e0d00aa59b8b7628ff02a097 Mon Sep 17 00:00:00 2001 From: Kieran Wynne Date: Tue, 28 May 2024 14:48:44 +0100 Subject: [PATCH] fix(route): Vice component role fix (#15737) * Removes deprecated parameter documentation * Fixes archaic component role structure --- lib/routes/vice/topic.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/routes/vice/topic.ts b/lib/routes/vice/topic.ts index 3c87dc75b..339655ad8 100644 --- a/lib/routes/vice/topic.ts +++ b/lib/routes/vice/topic.ts @@ -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('');