Skip to content

Commit

Permalink
Fix ReadRESTReq documentation (cosmos#9476)
Browse files Browse the repository at this point in the history
The `ReadRESTReq` function documentation stated it `returns true if errors occurred`, when it return false when an error occur

Co-authored-by: Marko <[email protected]>
Co-authored-by: Amaury <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2021
1 parent 98cf72c commit dccc0d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dccc0d6

Please sign in to comment.