Add namespaces to event creation path.

This commit is contained in:
Daniel Smith
2014-10-29 17:27:11 -07:00
parent ab9346d107
commit a7cc25f7ff
4 changed files with 30 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ func newEvents(c *Client) *events {
// Create makes a new event. Returns the copy of the event the server returns, or an error.
func (c *events) Create(event *api.Event) (*api.Event, error) {
result := &api.Event{}
err := c.r.Post().Path("events").Body(event).Do().Into(result)
err := c.r.Post().Path("events").Namespace(event.Namespace).Body(event).Do().Into(result)
return result, err
}