sayburgh-feed
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -35,11 +35,4 @@ const { join, resolve } = require('path') | ||
let xml | ||
const axios = require('axios'); | ||
// console.log('api ',options[0].api) | ||
// console.log('feed ',feedOption) | ||
await axios.get(options[0].api) | ||
.then(function (response) { | ||
// handle success | ||
// console.log(response.data); | ||
xml = response.data | ||
}) | ||
let api = options[0].api | ||
xml = await loadRss(api) | ||
let optionNew = this.options | ||
@@ -59,3 +52,6 @@ // const xmlGeneratePath = resolve(optionNew.rootDir, join(optionNew.generate.dir, feedOptions.path)) | ||
// const xml = await feedCache.get(index) | ||
// console.log('lol-----------------------') | ||
res.setHeader('Content-Type', 'application/xml') | ||
xml = await loadRss(api) | ||
// console.log('end') | ||
res.end(xml) | ||
@@ -195,3 +191,16 @@ } catch (err) { | ||
} | ||
async function loadRss (api) { | ||
// console.log('api calling') | ||
const axios = require('axios'); | ||
// console.log('api ',options[0].api) | ||
// console.log('feed ',feedOption) | ||
let xmlData | ||
await axios.get(api) | ||
.then(function (response) { | ||
// handle success | ||
// console.log(response.data); | ||
xmlData = response.data | ||
}) | ||
return xmlData | ||
} | ||
module.exports.meta = require('../package.json') |
{ | ||
"name": "sayburgh-feed", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Feed module for RSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17484
186