@factor/plugin-sitemap
Advanced tools
Comparing version 0.3.7 to 0.4.0
24
index.js
@@ -7,12 +7,14 @@ export default Factor => { | ||
path: "/sitemap.xml", | ||
callback: async (request, response, next) => { | ||
const sitemap = await this.createSitemap() | ||
sitemap.toXML(function(err, xml) { | ||
if (err) { | ||
return response.status(500).end() | ||
} | ||
response.header("Content-Type", "application/xml") | ||
response.send(xml) | ||
}) | ||
} | ||
middleware: [ | ||
async (request, response, next) => { | ||
const sitemap = await this.createSitemap() | ||
sitemap.toXML(function(err, xml) { | ||
if (err) { | ||
return response.status(500).end() | ||
} | ||
response.header("Content-Type", "application/xml") | ||
response.send(xml) | ||
}) | ||
} | ||
] | ||
}) | ||
@@ -25,3 +27,3 @@ | ||
async getPermalinks() { | ||
const results = await Factor.$db.search({ collection: "public", limit: 1000 }) | ||
const results = await Factor.$db.run({ method: "find", conditions: {}, limit: 1000 }) | ||
@@ -28,0 +30,0 @@ const urls = results.data |
{ | ||
"name": "@factor/plugin-sitemap", | ||
"version": "0.3.7", | ||
"version": "0.4.0", | ||
"license": "GPL-2.0", | ||
@@ -16,3 +16,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "174edc7cb60508cd2d707d18e411cb0a4c13b3cd" | ||
"gitHead": "763b7b89b0d6a1b0bb32ebd794c7fe76056f5123" | ||
} |
Sorry, the diff of this file is not supported yet
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
67
21218