Skip to content

Commit

Permalink
fix status code when creating subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Winnicki committed Feb 16, 2018
1 parent 7e9ffbf commit 1b9ba2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ JSON object:

Status code:

* `200 OK` on success
* `201 Created` on success
* `400 Bad Request` on validation error

JSON object:
Expand Down Expand Up @@ -569,7 +569,7 @@ JSON object:

Status code:

* `200 OK` on success
* `201 Created` on success
* `400 Bad Request` on validation error

JSON object:
Expand Down
1 change: 1 addition & 0 deletions httpapi/httpapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func (h HTTPAPI) createSubscription(w http.ResponseWriter, r *http.Request, para
return
}

w.WriteHeader(http.StatusCreated)
encoder.Encode(output)
}

Expand Down

0 comments on commit 1b9ba2f

Please sign in to comment.