Closed
Description
Summary
Height queries are now supported in the CLI client via #4382. A similar solution needs to be supported for the REST client.
Namely, each appropriate GET query endpoint will accept a height
query param and this value is then passed onto the context.
Essentially the following logic will have to be added to each respective handler:
heightStr := r.FormValue("height")
if heightStr != "" {
height, err := strconv.Atoi(heightStr)
if err != nil {
// TODO: handler error
}
cliCtx = cliCtx.WithHeight(height)
}
But maybe there is a cleaner way we can do this via middleware to reduce the amount of code we need to write.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels