aboutsummaryrefslogtreecommitdiff
path: root/client/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/client.go b/client/client.go
index 60797f5c..1f732376 100644
--- a/client/client.go
+++ b/client/client.go
@@ -96,7 +96,11 @@ func (c *Client) UserByUsername(username string) (*User, error) {
// CreateUser creates a new user in the system.
func (c *Client) CreateUser(username, password string, isAdmin bool) (*User, error) {
- body, err := c.request.Post("/v1/users", &User{Username: username, Password: password, IsAdmin: isAdmin})
+ body, err := c.request.Post("/v1/users", &UserCreationRequest{
+ Username: username,
+ Password: password,
+ IsAdmin: isAdmin,
+ })
if err != nil {
return nil, err
}