mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 02:15:17 +00:00
sapper handles decoding now
This commit is contained in:
@@ -8,7 +8,7 @@ posts.forEach(post => {
|
||||
export function get(req, res, next) {
|
||||
// the `slug` parameter is available because
|
||||
// this file is called [slug].json.js
|
||||
const slug = decodeURIComponent(req.params.slug);
|
||||
const { slug } = req.params;
|
||||
|
||||
if (lookup.has(slug)) {
|
||||
res.writeHead(200, {
|
||||
|
||||
Reference in New Issue
Block a user