Removed unnecessary body check (#21)
This commit is contained in:
parent
fd9ce4606d
commit
02d42bff30
4
api.go
4
api.go
@ -22,10 +22,6 @@ func webRegisterPost(w http.ResponseWriter, r *http.Request, _ httprouter.Params
|
|||||||
var regStatus int
|
var regStatus int
|
||||||
var reg []byte
|
var reg []byte
|
||||||
aTXT := ACMETxt{}
|
aTXT := ACMETxt{}
|
||||||
if r.Body == nil {
|
|
||||||
http.Error(w, string(jsonError("body_missing")), http.StatusBadRequest)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
json.NewDecoder(r.Body).Decode(&aTXT)
|
json.NewDecoder(r.Body).Decode(&aTXT)
|
||||||
// Create new user
|
// Create new user
|
||||||
nu, err := DB.Register(aTXT.AllowFrom)
|
nu, err := DB.Register(aTXT.AllowFrom)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user