Add swagger-ui for key management

This commit is contained in:
HaoyangLiu
2018-10-04 20:36:24 +08:00
parent 3d21d97af5
commit 8e1bfee6ca
11 changed files with 450 additions and 153 deletions
+1 -2
View File
@@ -17,7 +17,7 @@ import (
// register REST routes
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec, storeName string) {
r.HandleFunc(
"/accounts/{address}",
"/auth/accounts/{address}",
QueryAccountRequestHandlerFn(storeName, cdc, authcmd.GetAccountDecoder(cdc), cliCtx),
).Methods("GET")
r.HandleFunc(
@@ -36,7 +36,6 @@ func QueryAccountRequestHandlerFn(
decoder auth.AccountDecoder, cliCtx context.CLIContext,
) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
vars := mux.Vars(r)
bech32addr := vars["address"]