diff options
author | Wim <wim@42.be> | 2017-06-05 23:08:36 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-06-05 23:08:36 +0200 |
commit | b8a2fcbaff407e0070242fd0f428700f5d3e3031 (patch) | |
tree | 599d42043be5fb472d35f0ab7fa60fe93c4bbe5c /bridge | |
parent | 01496cd080a264e22799370322d53163498bdd5f (diff) | |
download | matterbridge-msglm-b8a2fcbaff407e0070242fd0f428700f5d3e3031.tar.gz matterbridge-msglm-b8a2fcbaff407e0070242fd0f428700f5d3e3031.tar.bz2 matterbridge-msglm-b8a2fcbaff407e0070242fd0f428700f5d3e3031.zip |
Post valid JSON (api). See #185
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/api/api.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bridge/api/api.go b/bridge/api/api.go index 4870ee6a..d53fc3b4 100644 --- a/bridge/api/api.go +++ b/bridge/api/api.go @@ -83,9 +83,7 @@ func (b *Api) handlePostMessage(c echo.Context) error { func (b *Api) handleMessages(c echo.Context) error { b.Lock() defer b.Unlock() - for _, msg := range b.Messages.Values() { - c.JSONPretty(http.StatusOK, msg, " ") - } + c.JSONPretty(http.StatusOK, b.Messages.Values(), " ") b.Messages = ring.Ring{} return nil } |