Skip to content

Commit

Permalink
fix: removed unused param in newSendRequestHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
ingvaar committed May 10, 2022
1 parent d944834 commit ae4c014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pkg/server/router.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package server

import (
"context"

"okp4/cosmos-faucet/pkg/client"
"okp4/cosmos-faucet/pkg/client"
)

func (s *httpServer) createRoutes(faucet *client.Faucet) {
s.router.Use(prometheusMiddleware)
s.router.Path("/").
Queries("address", "{address}").
HandlerFunc(newSendRequestHandlerFn(context.Background(), faucet)).
HandlerFunc(newSendRequestHandlerFn(faucet)).
Methods("GET")
s.router.Path("/health").
HandlerFunc(newHealthRequestHandlerFunc()).
Expand Down
3 changes: 1 addition & 2 deletions pkg/server/send.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package server

import (
"context"
"net/http"

"okp4/cosmos-faucet/pkg/client"
Expand All @@ -11,7 +10,7 @@ import (
"github.com/rs/zerolog/log"
)

func newSendRequestHandlerFn(ctx context.Context, faucet *client.Faucet) http.HandlerFunc {
func newSendRequestHandlerFn(faucet *client.Faucet) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
bech32Addr := vars["address"]
Expand Down

0 comments on commit ae4c014

Please sign in to comment.