Fix: Handel error of checkAdmin

This commit is contained in:
2021-12-12 15:08:44 +08:00
parent d2c852d57a
commit 047f15426b
3 changed files with 4 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ func (api *API) HandleReset(w http.ResponseWriter, r *http.Request) {
// check token
err = api.CheckAdmin(w, r)
if err != nil {
api.HandleError(w, r, err)
return
}
@@ -54,6 +55,7 @@ func (api *API) HandleWalk(w http.ResponseWriter, r *http.Request) {
// check token match
err = api.CheckAdmin(w, r)
if err != nil {
api.HandleError(w, r, err)
return
}