Unittest tasks
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user