feat(sub2api): add host adapter client and tests
This commit is contained in:
11
internal/host/sub2api/groups.go
Normal file
11
internal/host/sub2api/groups.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package sub2api
|
||||
|
||||
import "context"
|
||||
|
||||
func (c *Client) CreateGroup(ctx context.Context, req CreateGroupRequest) (GroupRef, error) {
|
||||
var ref GroupRef
|
||||
if err := c.postJSON(ctx, "/api/v1/admin/groups", req, &ref); err != nil {
|
||||
return GroupRef{}, err
|
||||
}
|
||||
return ref, nil
|
||||
}
|
||||
Reference in New Issue
Block a user