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:
Adrien Duval 2021-06-09 12:40:36 +02:00 committed by GitHub
parent 98cf72c4ba
commit dccc0d6a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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