feat: rename and remove swagger-ui

This commit is contained in:
Kevin Davis 2019-06-20 15:01:25 -04:00
parent ae91824557
commit c19c3645d2
2 changed files with 0 additions and 14 deletions

View File

@ -2,13 +2,11 @@ package main
import (
"fmt"
"net/http"
"os"
"path"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@ -45,8 +43,6 @@ import (
mintclient "github.com/cosmos/cosmos-sdk/x/mint/client"
slashingclient "github.com/cosmos/cosmos-sdk/x/slashing/client"
stakingclient "github.com/cosmos/cosmos-sdk/x/staking/client"
_ "github.com/cosmos/cosmos-sdk/client/lcd/statik"
)
func main() {
@ -167,7 +163,6 @@ func txCmd(cdc *amino.Codec, mc []sdk.ModuleClients) *cobra.Command {
// NOTE: details on the routes added for each module are in the module documentation
// NOTE: If making updates here you also need to update the test helper in client/lcd/test_helper.go
func registerRoutes(rs *lcd.RestServer) {
registerSwaggerUI(rs)
rpc.RegisterRoutes(rs.CliCtx, rs.Mux)
tx.RegisterRoutes(rs.CliCtx, rs.Mux, rs.Cdc)
auth.RegisterRoutes(rs.CliCtx, rs.Mux, rs.Cdc, at.StoreKey)
@ -179,15 +174,6 @@ func registerRoutes(rs *lcd.RestServer) {
mintrest.RegisterRoutes(rs.CliCtx, rs.Mux, rs.Cdc)
}
func registerSwaggerUI(rs *lcd.RestServer) {
statikFS, err := fs.New()
if err != nil {
panic(err)
}
staticServer := http.FileServer(statikFS)
rs.Mux.PathPrefix("/swagger-ui/").Handler(http.StripPrefix("/swagger-ui/", staticServer))
}
func initConfig(cmd *cobra.Command) error {
home, err := cmd.PersistentFlags().GetString(cli.HomeFlag)
if err != nil {