forked from OrgGo/Tasks
Fix empty category bug
This commit is contained in:
parent
8305a8e2d2
commit
7c494ec40d
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue