Removed unnecessary body check (#21)

This commit is contained in:
Joona Hoikkala 2017-11-15 01:39:00 +02:00 committed by GitHub
parent fd9ce4606d
commit 02d42bff30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
api.go
View File

@ -22,10 +22,6 @@ func webRegisterPost(w http.ResponseWriter, r *http.Request, _ httprouter.Params
var regStatus int
var reg []byte
aTXT := ACMETxt{}
if r.Body == nil {
http.Error(w, string(jsonError("body_missing")), http.StatusBadRequest)
return
}
json.NewDecoder(r.Body).Decode(&aTXT)
// Create new user
nu, err := DB.Register(aTXT.AllowFrom)