aboutsummaryrefslogtreecommitdiff
path: root/client/client.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2020-12-21 22:05:47 -0800
committerGravatar fguillot <f@miniflux.net> 2020-12-21 22:13:11 -0800
commitfd9eaa3e8370e9f9f62fb256aa6cd36bf6c1b86f (patch)
treee6eeb391438e2cdbc7671a7d03e01833614e42c1 /client/client.go
parent83f3ccab0e0a7340a13e2099b5e1629fafc32aa2 (diff)
downloadv2-fd9eaa3e8370e9f9f62fb256aa6cd36bf6c1b86f.tar.gz
v2-fd9eaa3e8370e9f9f62fb256aa6cd36bf6c1b86f.tar.zst
v2-fd9eaa3e8370e9f9f62fb256aa6cd36bf6c1b86f.zip
Make user fields editable via API
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
}