Post valid JSON (api). See #185

This commit is contained in:
Wim 2017-06-05 23:08:36 +02:00
parent 01496cd080
commit b8a2fcbaff
1 changed files with 1 additions and 3 deletions

View File

@ -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
}