1
0
mirror of https://github.com/writeas/go-writeas.git synced 2025-07-27 20:39:15 +00:00

Catch delete's 204 success response

This commit is contained in:
Matt Baer 2016-09-05 02:03:03 -04:00
parent 352395e604
commit 436e840f2e

View File

@ -127,7 +127,7 @@ func (c *Client) DeletePost(sp *PostParams) error {
}
status := env.Code
if status == http.StatusOK {
if status == http.StatusNoContent {
return nil
} else if c.isNotLoggedIn(status) {
return fmt.Errorf("Not authenticated.")