Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 16, 2024
1 parent c700ad9 commit db3ac74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/v2/api/rest/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (h *DefaultHandler[T]) createMessage(r *http.Request) (gogoproto.Message, e
limitedReader := io.LimitReader(r.Body, MaxBodySize)
err := jsonpb.Unmarshal(limitedReader, msg)
if err != nil {
return nil, fmt.Errorf("error parsing body: %v", err)
return nil, fmt.Errorf("error parsing body: %w", err)
}

return msg, nil
Expand Down
6 changes: 1 addition & 5 deletions server/v2/api/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"cosmossdk.io/core/transaction"
"cosmossdk.io/log"
serverv2 "cosmossdk.io/server/v2"
"cosmossdk.io/server/v2/appmanager"
)

const (
Expand Down Expand Up @@ -45,11 +44,8 @@ func (s *Server[T]) Init(appI serverv2.AppI[T], cfg map[string]any, logger log.L
}
}

var appManager *appmanager.AppManager[T]
appManager = appI.GetAppManager()

s.router = http.NewServeMux()
s.router.Handle("/", NewDefaultHandler(appManager))
s.router.Handle("/", NewDefaultHandler(appI.GetAppManager()))
s.config = serverCfg

return nil
Expand Down

0 comments on commit db3ac74

Please sign in to comment.