diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-02-10 09:15:23 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-02-10 09:15:23 -0600 |
| commit | dc45fbfad6a81456c494222fd16444b98c51b4b9 (patch) | |
| tree | b1748dfd5c654bb61e6af0cd66accbd7982b4cf6 /src | |
| parent | ecb1999795a24012c3556186a3f4f18abc6c3a95 (diff) | |
| download | invidious-dc45fbfad6a81456c494222fd16444b98c51b4b9.tar.gz invidious-dc45fbfad6a81456c494222fd16444b98c51b4b9.tar.bz2 invidious-dc45fbfad6a81456c494222fd16444b98c51b4b9.zip | |
Use error template for 404 and 500
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 5373a84d..e5c5553e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -269,12 +269,14 @@ get "/search" do |env| templated "search" end -get "/:path" do |env| - env.redirect "/" +error 404 do |env| + error_message = "404 Page not found" + templated "error" end error 500 do |env| - templated "index" + error_message = "500 Server error" + templated "error" end public_folder "assets" |
