Skip to content

Commit

Permalink
Fix privatenetwork requests
Browse files Browse the repository at this point in the history
Add the struct needed for the post() request for `privatenetwork/create`
Add the struct needed for the post() request for `privatenetwork/details`
  • Loading branch information
norrland committed Sep 19, 2024
1 parent f6f3176 commit dea4aba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions privatenetworks.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func (s *PrivateNetworkService) Create(context context.Context, name string) (*P
PrivateNetwork PrivateNetwork
}
}{}
err := s.client.post(context, "privatenetwork/create", &data, name)
err := s.client.post(context, "privatenetwork/create", &data, struct {
Name string `json:"name"`
}{name})
return &data.Response.PrivateNetwork, err
}

Expand All @@ -73,7 +75,9 @@ func (s *PrivateNetworkService) Details(context context.Context, privateNetworkI
PrivateNetwork PrivateNetwork
}
}{}
err := s.client.post(context, "privatenetwork/details", &data, privateNetworkID)
err := s.client.post(context, "privatenetwork/details", &data, struct {
PrivateNetworkID string `json:"privatenetworkid"`
}{privateNetworkID})
return &data.Response.PrivateNetwork, err
}

Expand Down

0 comments on commit dea4aba

Please sign in to comment.