Change <loc> format from /posts/:id to /posts?post=:id

master
Raymonzut 4 years ago
parent bb923a69e7
commit da9024548d
No known key found for this signature in database
GPG Key ID: 1E9BCC39EDD1DD53
  1. 2
      server/routes/api/posts.js

@ -70,7 +70,7 @@ routes.set('/urls', async (req, res) => {
const BASE_URL = 'https://' + req.raw.hostname + endpoint const BASE_URL = 'https://' + req.raw.hostname + endpoint
const urls = posts.map(post => const urls = posts.map(post =>
`\n <url> `\n <url>
<loc>${BASE_URL}/${post._id}</loc> <loc>${BASE_URL}?post=${post._id}</loc>
<lastmod>${post.date}</lastmod> <lastmod>${post.date}</lastmod>
<changefreq>never</changefreq> <changefreq>never</changefreq>
<priority>0.9</priority> <priority>0.9</priority>

Loading…
Cancel
Save