From 7c494ec40d8f01a894bcadb4d0743fd2fb123024 Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 18 Feb 2016 01:03:01 +0530 Subject: [PATCH] Fix empty category bug --- views/addViews.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/addViews.go b/views/addViews.go index 065c638..98f8123 100644 --- a/views/addViews.go +++ b/views/addViews.go @@ -138,6 +138,9 @@ func AddCategoryFunc(w http.ResponseWriter, r *http.Request) { message = "Added category" http.Redirect(w, r, "/", http.StatusFound) } + } else { + message = "Invalid Category Name" + http.Redirect(w, r, "/", http.StatusBadRequest) } }