Unittest tasks

This commit is contained in:
Bel LaPointe
2019-11-12 14:47:33 -07:00
parent 8c4bc81694
commit ee77d9d3b7
5 changed files with 200 additions and 4 deletions

View File

@@ -67,7 +67,9 @@ func (a *Ajax) HandleAjax(w http.ResponseWriter, r *http.Request) {
} else if v := params.Get("setHideList"); v != "" {
foo = a.setHideList
}
if err := foo(w, r); err != nil {
if err := foo(w, r); err == storage.ErrNotFound {
http.Error(w, err.Error(), http.StatusNotFound)
} else if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}