Merge PR #2215: Add swagger-ui for gaiacli lite-server

This commit is contained in:
HaoyangLiu
2018-10-04 13:00:24 +02:00
committed by Christopher Goes
parent b4e8fe5e94
commit 9f67e8af20
46 changed files with 81580 additions and 1050 deletions
+6 -1
View File
@@ -58,7 +58,12 @@ func GetAccountCmd(storeName string, cdc *codec.Codec, decoder auth.AccountDecod
return err
}
output, err := codec.MarshalJSONIndent(cdc, acc)
var output []byte
if cliCtx.Indent {
output, err = cdc.MarshalJSONIndent(acc, "", " ")
} else {
output, err = cdc.MarshalJSON(acc)
}
if err != nil {
return err
}
+6 -1
View File
@@ -57,7 +57,12 @@ func makeSignCmd(cdc *amino.Codec, decoder auth.AccountDecoder) func(cmd *cobra.
if err != nil {
return err
}
json, err := cdc.MarshalJSON(newTx)
var json []byte
if cliCtx.Indent {
json, err = cdc.MarshalJSONIndent(newTx, "", " ")
} else {
json, err = cdc.MarshalJSON(newTx)
}
if err != nil {
return err
}