diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-01-27 09:22:27 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-01-27 09:22:27 -0500 |
commit | f0e6e7de93715f61ef3055efe29ecc35bfefb35d (patch) | |
tree | be81061f6169401a0cae6507d4164da969f4e605 /model/client.go | |
parent | e5ed90821e6bb25c27e5627cf289df41cbcb1793 (diff) | |
parent | 6fd0f651b94e594dddb00800bf295af7ff42934e (diff) | |
download | chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.tar.gz chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.tar.bz2 chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.zip |
Merge pull request #1993 from mattermost/PLT-1586
PLT-1586 adding LDAP/OAuth to iOS
Diffstat (limited to 'model/client.go')
-rw-r--r-- | model/client.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/model/client.go b/model/client.go index 8021c7039..d31ac1592 100644 --- a/model/client.go +++ b/model/client.go @@ -775,6 +775,17 @@ func (c *Client) UpdateUserRoles(data map[string]string) (*Result, *AppError) { } } +func (c *Client) AttachDeviceId(deviceId string) (*Result, *AppError) { + data := make(map[string]string) + data["device_id"] = deviceId + if r, err := c.DoApiPost("/users/attach_device", MapToJson(data)); err != nil { + return nil, err + } else { + return &Result{r.Header.Get(HEADER_REQUEST_ID), + r.Header.Get(HEADER_ETAG_SERVER), UserFromJson(r.Body)}, nil + } +} + func (c *Client) UpdateActive(userId string, active bool) (*Result, *AppError) { data := make(map[string]string) data["user_id"] = userId |