mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-16 04:44:35 +00:00
Add goto function (#46)
* WIP * programmatic navigation * get tests working * wait longer
This commit is contained in:
@@ -187,7 +187,8 @@ function get_route_handler(fn) {
|
||||
|
||||
next();
|
||||
} catch(err) {
|
||||
res.status(500).end(templates.render(500, {
|
||||
res.status(500);
|
||||
res.end(templates.render(500, {
|
||||
title: (err && err.name) || 'Internal server error',
|
||||
url,
|
||||
error: escape_html(err && (err.details || err.message || err) || 'Unknown error'),
|
||||
@@ -201,7 +202,8 @@ function get_not_found_handler(fn) {
|
||||
return function handle_not_found(req, res) {
|
||||
const asset_cache = fn();
|
||||
|
||||
res.status(404).end(templates.render(404, {
|
||||
res.status(404);
|
||||
res.end(templates.render(404, {
|
||||
title: 'Not found',
|
||||
status: 404,
|
||||
method: req.method,
|
||||
|
||||
Reference in New Issue
Block a user