Fix invalid URL in client

This commit is contained in:
Vetrov Alexey 2020-03-21 23:52:15 +00:00 committed by Arseny Balobanov
parent 6c871e6474
commit 7fb06f4ac4

View file

@ -22,7 +22,7 @@ func New(addr string) *Client {
func (c *Client) Add(r *models.AddRequest) (*models.Todo, error) {
data, _ := json.Marshal(r)
resp, err := http.Post(c.addr+"/create", "application/json", bytes.NewReader(data))
resp, err := http.Post(c.addr+"/todo/create", "application/json", bytes.NewReader(data))
if err != nil {
return nil, err
}