From 7cb817d5a777965c922fdad49d2024b5f0f86c40 Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Mon, 15 Feb 2016 10:24:58 +0100 Subject: fix TestListCommands --- model/client.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'model/client.go') 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), -- cgit v1.2.3-1-g7c22