Fix status code in response body
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
c8d040d8b8
commit
49d2cd439e
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
|
|||
if (code != 200) {
|
||||
json.NewEncoder(w).Encode(ErrorResponse{
|
||||
Message: "There has been an error.",
|
||||
StatusCode: 400,
|
||||
StatusCode: code,
|
||||
})
|
||||
} else {
|
||||
json.NewEncoder(w).Encode(SuccessResponse{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue