Skip to content

Commit

Permalink
Get rid of the returned connection within the http handler
Browse files Browse the repository at this point in the history
  • Loading branch information
edufschmidt committed Jun 11, 2021
1 parent cf1bbce commit a57052c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ func (n *Connections) List() ([]*structs.ConnectionListStub, error) {
return items, nil
}

func (n *Connections) Create(connection *structs.Connection) (*structs.Connection, error) {
func (n *Connections) Create(connection *structs.Connection) error {

err := n.client.createResource(connectionsPath, connection, nil)

err := n.client.createResource(networksPath, connection, out)
if err != nil {
return nil, err
return err
}

return out, nil
return nil
}

func (n *Connections) Update(conn *structs.Connection) (*structs.Connection, error) {
Expand Down

0 comments on commit a57052c

Please sign in to comment.