diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/client.go | 11 | ||||
-rw-r--r-- | model/user.go | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/model/client.go b/model/client.go index 75b93c971..b8e7c4894 100644 --- a/model/client.go +++ b/model/client.go @@ -434,7 +434,7 @@ func (c *Client) TestEmail(config *Config) (*Result, *AppError) { } } -func (c *Client) GetAnalytics(teamId, name string) (*Result, *AppError) { +func (c *Client) GetTeamAnalytics(teamId, name string) (*Result, *AppError) { if r, err := c.DoApiGet("/admin/analytics/"+teamId+"/"+name, "", ""); err != nil { return nil, err } else { @@ -443,6 +443,15 @@ func (c *Client) GetAnalytics(teamId, name string) (*Result, *AppError) { } } +func (c *Client) GetSystemAnalytics(name string) (*Result, *AppError) { + if r, err := c.DoApiGet("/admin/analytics/"+name, "", ""); err != nil { + return nil, err + } else { + return &Result{r.Header.Get(HEADER_REQUEST_ID), + r.Header.Get(HEADER_ETAG_SERVER), AnalyticsRowsFromJson(r.Body)}, nil + } +} + func (c *Client) CreateChannel(channel *Channel) (*Result, *AppError) { if r, err := c.DoApiPost("/channels/create", channel.ToJson()); err != nil { return nil, err diff --git a/model/user.go b/model/user.go index 7744b0073..44228d93f 100644 --- a/model/user.go +++ b/model/user.go @@ -236,7 +236,6 @@ func (u *User) Sanitize(options map[string]bool) { } func (u *User) ClearNonProfileFields() { - u.CreateAt = 0 u.UpdateAt = 0 u.Password = "" u.AuthData = "" |