Fix empty category bug

This commit is contained in:
Suraj 2016-02-18 01:03:01 +05:30
parent 8305a8e2d2
commit 7c494ec40d
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}
}