modified: package.json

modified:   src/pages/api/podcasts/hobbits/rss/index.ts
	modified:   "src/\321\201omponents/podcasts/getRssXml.ts"
main
joker 3 years ago
parent 0a98a13440
commit 7b9ea24e19
  1. 2
      package.json
  2. 2
      src/pages/api/podcasts/hobbits/rss/index.ts
  3. 2
      src/сomponents/podcasts/getRssXml.ts

@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build -p 3002",
"start": "next start -p 3002", "start": "next start -p 3002",
"lint": "next lint" "lint": "next lint"
}, },

@ -19,7 +19,7 @@ export default function handler(
Select(sql_company, function(data_company : any){ Select(sql_company, function(data_company : any){
Select(sql_items, function(data_items : any){ Select(sql_items, function(data_items : any){
res.setHeader('Content-Type', 'text/xml'); res.setHeader('Content-Type', 'text/xml');
res.status(200).send(getRssXml(data_company[0])+data_items.map((rows : any) => Items(rows))+'</channel> </rss>'); res.status(200).send(getRssXml(data_company[0])+data_items.map((rows : any) => Items(rows)).join("")+'</channel> </rss>');
}) })
}) })

@ -38,7 +38,7 @@ export const getRssXml = (data: Props) => {
<image> <image>
<link>`+data.webSite+`</link> <link>`+data.webSite+`</link>
<title>`+data.nameCompanies+`</title> <title>`+data.nameCompanies+`</title>
<url>`+data.webSite+'/'+data.urlImg+`</url> <url>`+data.webSite+'/img/'+data.urlImg+`</url>
</image> </image>
<googleplay:image href="`+data.webSite+'/'+data.urlImg+`"/> <googleplay:image href="`+data.webSite+'/'+data.urlImg+`"/>
<itunes:image href="`+data.webSite+'/'+data.urlImg+`"/> <itunes:image href="`+data.webSite+'/'+data.urlImg+`"/>

Loading…
Cancel
Save