summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorNicolas Clerc <kernicPanel@nclerc.fr>2016-02-15 10:24:58 +0100
committerNicolas Clerc <kernicPanel@nclerc.fr>2016-03-17 01:45:37 +0100
commit7cb817d5a777965c922fdad49d2024b5f0f86c40 (patch)
tree4ad2f65b1f4e15d5db849b3a6a554e1048db9492 /model
parent49eda73749d0920e985fc0f92df34a575088012c (diff)
downloadchat-7cb817d5a777965c922fdad49d2024b5f0f86c40.tar.gz
chat-7cb817d5a777965c922fdad49d2024b5f0f86c40.tar.bz2
chat-7cb817d5a777965c922fdad49d2024b5f0f86c40.zip
fix TestListCommands
Diffstat (limited to 'model')
-rw-r--r--model/client.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/model/client.go b/model/client.go
index 3adcb980d..14c175fc1 100644
--- a/model/client.go
+++ b/model/client.go
@@ -363,8 +363,11 @@ func (c *Client) Command(channelId string, command string, suggest bool) (*Resul
}
}
-func (c *Client) ListCommands() (*Result, *AppError) {
- if r, err := c.DoApiGet("/commands/list", "", ""); err != nil {
+func (c *Client) ListCommands(channelId string, command string) (*Result, *AppError) {
+ m := make(map[string]string)
+ m["command"] = command
+ m["channelId"] = channelId
+ if r, err := c.DoApiPost("/commands/list", MapToJson(m)); err != nil {
return nil, err
} else {
return &Result{r.Header.Get(HEADER_REQUEST_ID),