Fix ReadRESTReq documentation (#9476)
The `ReadRESTReq` function documentation stated it `returns true if errors occurred`, when it return false when an error occur Co-authored-by: Marko <marbar3778@yahoo.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
This commit is contained in:
parent
98cf72c4ba
commit
dccc0d6a45
|
@ -133,7 +133,7 @@ func (br BaseReq) ValidateBasic(w http.ResponseWriter) bool {
|
|||
}
|
||||
|
||||
// ReadRESTReq reads and unmarshals a Request's body to the the BaseReq struct.
|
||||
// Writes an error response to ResponseWriter and returns true if errors occurred.
|
||||
// Writes an error response to ResponseWriter and returns false if errors occurred.
|
||||
func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.LegacyAmino, req interface{}) bool {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if CheckBadRequestError(w, err) {
|
||||
|
|
Loading…
Reference in New Issue