summaryrefslogtreecommitdiffstats
path: root/model/client.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-10 18:32:22 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-10 18:32:22 -0700
commite06e292be71ca699d90bafbd635118aa47c2d7a5 (patch)
tree3f8f7ce86a1618f625e71084041746745139ba0c /model/client.go
parent41439eb801c6c8c0a55bcada3eeba3b4a561c663 (diff)
downloadchat-e06e292be71ca699d90bafbd635118aa47c2d7a5.tar.gz
chat-e06e292be71ca699d90bafbd635118aa47c2d7a5.tar.bz2
chat-e06e292be71ca699d90bafbd635118aa47c2d7a5.zip
PLT-12 adding log viewer
Diffstat (limited to 'model/client.go')
-rw-r--r--model/client.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/model/client.go b/model/client.go
index c355b90f5..5aac09289 100644
--- a/model/client.go
+++ b/model/client.go
@@ -338,6 +338,15 @@ func (c *Client) GetAudits(id string, etag string) (*Result, *AppError) {
}
}
+func (c *Client) GetLogs() (*Result, *AppError) {
+ if r, err := c.DoGet("/admin/logs", "", ""); err != nil {
+ return nil, err
+ } else {
+ return &Result{r.Header.Get(HEADER_REQUEST_ID),
+ r.Header.Get(HEADER_ETAG_SERVER), ArrayFromJson(r.Body)}, nil
+ }
+}
+
func (c *Client) CreateChannel(channel *Channel) (*Result, *AppError) {
if r, err := c.DoPost("/channels/create", channel.ToJson()); err != nil {
return nil, err