-
Notifications
You must be signed in to change notification settings - Fork 1
/
query.go
33 lines (26 loc) · 974 Bytes
/
query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package rest
import (
"github.com/gorilla/mux"
"github.com/cosmos/cosmos-sdk/client"
)
func registerQueryRoutes(cliCtx client.Context, r *mux.Router) {
// get the current mint parameter values
//r.HandleFunc(fmt.Sprintf("/%s/params", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET")
}
// // HTTP request handler to get the current mint parameter values
// func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc {
// return func(w http.ResponseWriter, r *http.Request) {
// route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryParameters)
// cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r)
// if !ok {
// return
// }
// res, height, err := cliCtx.QueryWithData(route, nil)
// if err != nil {
// rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error())
// return
// }
// cliCtx = cliCtx.WithHeight(height)
// rest.PostProcessResponse(w, cliCtx, res)
// }
// }