Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
fe1838c7f4
commit
3520056529
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(code)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
if code != 200 {
|
||||
if code != http.StatusOK {
|
||||
json.NewEncoder(w).Encode(ErrorResponse{
|
||||
Message: "There has been an error.",
|
||||
StatusCode: code,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue