From b0511c088542f6724cd51e85a5bdc9a8624935fa Mon Sep 17 00:00:00 2001 From: Tim Geyssens Date: Thu, 18 Oct 2018 21:59:24 +0200 Subject: [PATCH 1/2] Also show error message beneath the add row since if it's only at the top you don't notice it --- source/Simple301/Client/app.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/Simple301/Client/app.html b/source/Simple301/Client/app.html index a46916a..98a332b 100644 --- a/source/Simple301/Client/app.html +++ b/source/Simple301/Client/app.html @@ -81,6 +81,19 @@

{{redirects.length}} rows

+ + +
+
+
+
+ +

Error : {{errorMessage}}

+
+
+
+
+ From b2db0ebd7c3516e67902fef3add7c6d3453c05b3 Mon Sep 17 00:00:00 2001 From: Tim Geyssens Date: Wed, 28 Nov 2018 10:29:29 +0100 Subject: [PATCH 2/2] Make sure urls that end on / work --- source/Simple301/Core/RedirectRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Simple301/Core/RedirectRepository.cs b/source/Simple301/Core/RedirectRepository.cs index fa4759b..b615c8c 100644 --- a/source/Simple301/Core/RedirectRepository.cs +++ b/source/Simple301/Core/RedirectRepository.cs @@ -227,7 +227,7 @@ private static Redirect FetchRedirectByOldUrl(string oldUrl, bool fromCache = fa var query = "SELECT * FROM Redirects WHERE OldUrl=@0"; if (fromCache) - return _cacheManager.GetAndSet(CACHE_CATEGORY, "OldUrl:" + oldUrl, () => FetchRedirectFromDbByQuery(query, oldUrl)); + return _cacheManager.GetAndSet(CACHE_CATEGORY, "OldUrl:" + oldUrl.TrimEnd('/'), () => FetchRedirectFromDbByQuery(query, oldUrl.TrimEnd('/'))); return FetchRedirectFromDbByQuery(query, oldUrl); }