missing returns in error conditions
This commit is contained in:
parent
d482edcb6c
commit
5e2097f15c
@ -344,6 +344,7 @@ func main() {
|
||||
if DebugMode {
|
||||
log.Printf(errorStr)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if !json.Valid(data) {
|
||||
@ -351,6 +352,7 @@ func main() {
|
||||
log.Println("send invalid json request")
|
||||
}
|
||||
res.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
org, extraAction, err := parseRequestJSONOrg(reqType, data)
|
||||
@ -382,6 +384,7 @@ func main() {
|
||||
if DebugMode {
|
||||
log.Println(errorStr)
|
||||
}
|
||||
return
|
||||
}
|
||||
res.WriteHeader(http.StatusOK)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user