Fix AddEmail (#260) (#261)

Merge branch 'release/v0.11' into backport_260

correct version (#259)

correct

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/259
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>

fix AddEmail

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/261
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
6543 2020-02-03 02:07:42 +00:00 committed by Lunny Xiao
parent 415f379ebd
commit b7dd23f016

View file

@ -35,7 +35,7 @@ func (c *Client) AddEmail(opt CreateEmailOption) ([]*Email, error) {
return nil, err
}
emails := make([]*Email, 0, 3)
return emails, c.getParsedResponse("POST", "/user/emails", jsonHeader, bytes.NewReader(body), emails)
return emails, c.getParsedResponse("POST", "/user/emails", jsonHeader, bytes.NewReader(body), &emails)
}
// DeleteEmailOption options when deleting email addresses