missing returns in error conditions

This commit is contained in:
Adam Majer 2024-09-10 17:33:34 +02:00
parent d482edcb6c
commit 5e2097f15c

View File

@ -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)
})