UpdateSelf #
Updates the current user object in Kuzzle.
Arguments #
func (a *Auth) UpdateSelf(data json.RawMessage, options types.QueryOptions) (*security.User, error)
Arguments | Type | Description |
---|---|---|
content | string | the new credentials |
options | QueryOptions | QueryOptions object containing query options |
Options #
Additional query options
Property | Type | Description | Default |
---|---|---|---|
Queuable | bool | Make this request queuable or not | true |
Return #
A pointer to a security.User object and an error or nil
Usage #
kuzzle.Auth.Login("local", json.RawMessage("{\"username\":\"foo\",\"password\":\"bar\"}"), nil)
_, err := kuzzle.Auth.UpdateSelf(json.RawMessage("{\"foo\":\"bar\"}"), nil)
if err != nil {
log.Fatal(err)
} else {
fmt.Println("Success")
}
Edit this page on Github(opens new window)