switch to [slug].json.js server routes, instead of /api/...

This commit is contained in:
Rich Harris
2018-03-03 21:39:28 -05:00
parent e5d3589b63
commit 6a286f470d
5 changed files with 5 additions and 5 deletions

View File

@@ -59,7 +59,7 @@
// is called [slug].html
const { slug } = params;
return fetch(`/api/blog/${slug}`).then(r => r.json()).then(post => {
return fetch(`/blog/${slug}.json`).then(r => r.json()).then(post => {
return { post };
});
}