From 00b089ff5371b666e48cae43d5421b36fe8561ee Mon Sep 17 00:00:00 2001 From: Ou Date: Wed, 23 Oct 2024 10:05:27 +0800 Subject: [PATCH] fix(source): wallstreetcn-news --- server/sources/wallstreetcn.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sources/wallstreetcn.ts b/server/sources/wallstreetcn.ts index c05e5ed..b276415 100644 --- a/server/sources/wallstreetcn.ts +++ b/server/sources/wallstreetcn.ts @@ -2,8 +2,6 @@ interface Item { uri: string id: number title?: string - // ad - resource_type?: string content_text: string content_short: string display_time: number @@ -18,6 +16,8 @@ interface LiveRes { interface NewsRes { data: { items: { + // ad + resource_type?: string resource: Item }[] } @@ -52,7 +52,7 @@ const news = defineSource(async () => { const res: NewsRes = await $fetch(apiUrl) return res.data.items - .filter(k => k.resource.resource_type !== "ad" && k.resource.type !== "live") + .filter(k => k.resource_type !== "ad" && k.resource.type !== "live" && k.resource.uri) .map(({ resource: h }) => { return { id: h.id,