Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
XuHuaiyu committed May 7, 2019
1 parent 0952fd1 commit a913b80
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions server/statistics_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package server

import (
"errors"
"net/http"
"time"

Expand Down Expand Up @@ -48,10 +47,6 @@ func (s *Server) newStatsHandler() *StatsHandler {
}

func (sh StatsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if req.Method != http.MethodGet {
writeError(w, errors.New("only http GET method is supported"))
return
}
w.Header().Set("Content-Type", "application/json")

params := mux.Vars(req)
Expand Down Expand Up @@ -90,10 +85,6 @@ func (s *Server) newStatsHistoryHandler() *StatsHistoryHandler {
}

func (sh StatsHistoryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if req.Method != http.MethodGet {
writeError(w, errors.New("only http GET method is supported"))
return
}
w.Header().Set("Content-Type", "application/json")

params := mux.Vars(req)
Expand Down

0 comments on commit a913b80

Please sign in to comment.