1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Make user fields editable via API

This commit is contained in:
Frédéric Guillot 2020-12-21 22:05:47 -08:00 committed by fguillot
parent 83f3ccab0e
commit fd9eaa3e83
7 changed files with 139 additions and 27 deletions

View file

@ -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
}