Correctly respond with 404
This commit is contained in:
@@ -40,6 +40,7 @@ module Adamantium
|
||||
end
|
||||
|
||||
def not_found(_req, res, _exception)
|
||||
res.status = 404
|
||||
res.render not_found_view
|
||||
end
|
||||
|
||||
|
@@ -7,6 +7,7 @@ module Adamantium
|
||||
def handle(req, res)
|
||||
slug = req.params[:slug]
|
||||
|
||||
res.status = File.exist?("app/content/pages/#{slug}.md") ? 200 : 404
|
||||
res.render show, slug: slug
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user