Skip to content

Commit

Permalink
fix superfluous response
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Marinov committed Dec 13, 2019
1 parent c1b7eb2 commit ba514f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (handler *requestHandler) getTransactions(writer http.ResponseWriter, reque
if err != nil {
log.Error(err)
writer.WriteHeader(http.StatusInternalServerError)
return
}

if _, err = writer.Write([]byte(msg)); err != nil {
Expand All @@ -95,8 +96,6 @@ func (handler *requestHandler) getTransactions(writer http.ResponseWriter, reque
return
}

writer.WriteHeader(http.StatusOK)

}

func (handler *requestHandler) getLastEvent(writer http.ResponseWriter, request *http.Request) {
Expand Down Expand Up @@ -156,8 +155,6 @@ func (handler *requestHandler) getLastEvent(writer http.ResponseWriter, request
return
}

writer.WriteHeader(http.StatusOK)

}

func isValidLastEventFlag(lastEvent string) bool {
Expand Down

0 comments on commit ba514f4

Please sign in to comment.