diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-10-16 18:06:40 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-10-16 18:06:40 +0500 |
commit | 0fbe63eb37b0764a106b0fdd47bc149f122b520d (patch) | |
tree | 77cadc54d3a8d0e7812e69c50628cc7f3c5d71b7 /model/client.go | |
parent | b00ffa83e7371fa7dd4570130ee8b506943aee01 (diff) | |
parent | 89716cb046ee3c8f13b361053d91149f5ce29cbf (diff) | |
download | chat-0fbe63eb37b0764a106b0fdd47bc149f122b520d.tar.gz chat-0fbe63eb37b0764a106b0fdd47bc149f122b520d.tar.bz2 chat-0fbe63eb37b0764a106b0fdd47bc149f122b520d.zip |
Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Diffstat (limited to 'model/client.go')
-rw-r--r-- | model/client.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/model/client.go b/model/client.go index 77b0aaad2..eea65c50e 100644 --- a/model/client.go +++ b/model/client.go @@ -185,7 +185,7 @@ func (c *Client) FindTeams(email string) (*Result, *AppError) { } else { return &Result{r.Header.Get(HEADER_REQUEST_ID), - r.Header.Get(HEADER_ETAG_SERVER), ArrayFromJson(r.Body)}, nil + r.Header.Get(HEADER_ETAG_SERVER), TeamMapFromJson(r.Body)}, nil } } @@ -844,6 +844,15 @@ func (c *Client) ListIncomingWebhooks() (*Result, *AppError) { } } +func (c *Client) GetAllPreferences() (*Result, *AppError) { + if r, err := c.DoApiGet("/preferences/", "", ""); err != nil { + return nil, err + } else { + preferences, _ := PreferencesFromJson(r.Body) + return &Result{r.Header.Get(HEADER_REQUEST_ID), r.Header.Get(HEADER_ETAG_SERVER), preferences}, nil + } +} + func (c *Client) SetPreferences(preferences *Preferences) (*Result, *AppError) { if r, err := c.DoApiPost("/preferences/save", preferences.ToJson()); err != nil { return nil, err |