mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
Merge branch 'master' into spread_routes
This commit is contained in:
8
test/apps/basics/src/routes/middleware/index.js
Normal file
8
test/apps/basics/src/routes/middleware/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export function get(req, res, next) {
|
||||
if (req.headers.accept === 'application/json') {
|
||||
res.end('{"json":true}');
|
||||
return;
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
1
test/apps/basics/src/routes/middleware/index.svelte
Normal file
1
test/apps/basics/src/routes/middleware/index.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1>HTML</h1>
|
||||
Reference in New Issue
Block a user