From c091efe84d1adc38afb008e667045a65ff992afe Mon Sep 17 00:00:00 2001 From: xemeds Date: Mon, 20 Jul 2020 18:14:55 +0000 Subject: [PATCH] Made the shortened url route return a 404 error for not found tokens --- tiny0/database.db | Bin 12288 -> 12288 bytes tiny0/routes.py | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tiny0/database.db b/tiny0/database.db index eaf63e081270bdeb41d6bb4a179e38c31ea494a2..5d691a88e15b5bdde46d09d0e54d07de036b4d60 100644 GIT binary patch delta 33 gcmZojXh@hKEojKVz`zW|FrY9|$C%M@W5NP`0AUyf(*OVf delta 33 gcmZojXh@hKEvU=Dz`zW|Fd#co$Cy!fW5NP`0APLv$N&HU diff --git a/tiny0/routes.py b/tiny0/routes.py index d59e19d..c0b9f84 100644 --- a/tiny0/routes.py +++ b/tiny0/routes.py @@ -36,7 +36,8 @@ def short_url(token): # If the query response was empty if not query: - return "invalid" + # Return the error page with a 404 not found error + return render_template("error.html", error_message="404 Not Found"), 404 # Else if the query response contained data else: