File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ type Res = {
22 description : string
33 link : string
44 // Date
5- pubDate : string
5+ pub_date : string
66 publisher : string
77 title : string
88} [ ]
99export default defineSource ( async ( ) => {
10- const res = await Promise . all ( [ "https://kaopustorage.blob.core.windows.net/jsondata/news_list_beta_hans_0 .json" , "https://kaopustorage.blob.core.windows.net/jsondata/news_list_beta_hans_1.json" ] . map ( url => myFetch ( url ) as Promise < Res > ) )
11- return res . flat ( ) . filter ( k => [ "财新" , "公视" ] . every ( h => k . publisher !== h ) ) . map ( ( k ) => {
10+ const res : Res = await $fetch ( "https://kaopustorage.blob.core.windows.net/news-prod/news_list_hans_0 .json" )
11+ return res . filter ( k => [ "财新" , "公视" ] . every ( h => k . publisher !== h ) ) . map ( ( k ) => {
1212 return {
1313 id : k . link ,
1414 title : k . title ,
15- pubDate : k . pubDate ,
15+ pubDate : k . pub_date ,
1616 extra : {
1717 hover : k . description ,
1818 info : k . publisher ,
You can’t perform that action at this time.
0 commit comments