From b8a2fcbaff407e0070242fd0f428700f5d3e3031 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 5 Jun 2017 23:08:36 +0200 Subject: [PATCH] Post valid JSON (api). See #185 --- bridge/api/api.go | 4 +--- 1 file changed, 1 insertion(+), 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 }