Skip to content

Commit

Permalink
fix oracle endpoint to accept voter variable (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
yys authored and dokwon committed Dec 3, 2019
1 parent 0ba438d commit 15fbf9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/oracle/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func registerQueryRoute(cliCtx context.CLIContext, r *mux.Router) {
r.HandleFunc(fmt.Sprintf("/oracle/denoms/{%s}/exchange_rate", RestDenom), queryExchangeRateHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc("/oracle/denoms/actives", queryActivesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc("/oracle/denoms/exchange_rates", queryExchangeRatesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc("/oracle/voters/{%s}/prevotes", queryVoterPrevotesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc("/oracle/voters/{%s}/votes", queryVoterVotesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc(fmt.Sprintf("/oracle/voters/{%s}/prevotes", RestVoter), queryVoterPrevotesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc(fmt.Sprintf("/oracle/voters/{%s}/votes", RestVoter), queryVoterVotesHandlerFunction(cliCtx)).Methods("GET")
r.HandleFunc(fmt.Sprintf("/oracle/voters/{%s}/feeder", RestVoter), queryFeederDelegationHandlerFn(cliCtx)).Methods("GET")
r.HandleFunc(fmt.Sprintf("/oracle/voters/{%s}/miss", RestVoter), queryMissHandlerFn(cliCtx)).Methods("GET")
r.HandleFunc("/oracle/parameters", queryParamsHandlerFn(cliCtx)).Methods("GET")
Expand Down Expand Up @@ -204,7 +204,7 @@ func queryVoterPrevotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFu
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -239,7 +239,7 @@ func queryVoterVotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down

0 comments on commit 15fbf9c

Please sign in to comment.