PLT-3921 Fix System Console Recent Active Users (#3856)

* PLT-3921 System Console Recent Active Users
Этот коммит содержится в:
enahum
2016-09-06 15:48:43 -03:00
коммит произвёл GitHub
родитель 9a9ae3dcd1
Коммит 35b816b922
9 изменённых файлов: 99 добавлений и 1 удалений

Просмотреть файл

@@ -820,6 +820,17 @@ func (c *Client) GetClusterStatus() ([]*ClusterInfo, *AppError) {
}
}
// GetRecentlyActiveUsers returns a map of users including lastActivityAt using user id as the key
func (c *Client) GetRecentlyActiveUsers(teamId string) (*Result, *AppError) {
if r, err := c.DoApiGet("/admin/recently_active_users/"+teamId, "", ""); err != nil {
return nil, err
} else {
defer closeBody(r)
return &Result{r.Header.Get(HEADER_REQUEST_ID),
r.Header.Get(HEADER_ETAG_SERVER), UserMapFromJson(r.Body)}, nil
}
}
func (c *Client) GetAllAudits() (*Result, *AppError) {
if r, err := c.DoApiGet("/admin/audits", "", ""); err != nil {
return nil, err