refactor: remove superfluous (and untested) code

This commit is contained in:
Deluan
2020-03-02 09:37:47 -05:00
parent 72f0a6fb66
commit fc06163b5a
2 changed files with 6 additions and 22 deletions
-15
View File
@@ -89,18 +89,3 @@ func authenticate(users engine.Users) func(next http.Handler) http.Handler {
})
}
}
func requiredParams(params ...string) func(next http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
for _, p := range params {
_, err := RequiredParamString(r, p, fmt.Sprintf("%s parameter is required", p))
if err != nil {
SendError(w, r, err)
return
}
}
next.ServeHTTP(w, r)
})
}
}