mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-10 03:10:26 +00:00
Post valid JSON (api). See #185
This commit is contained in:
parent
01496cd080
commit
b8a2fcbaff
@ -83,9 +83,7 @@ func (b *Api) handlePostMessage(c echo.Context) error {
|
|||||||
func (b *Api) handleMessages(c echo.Context) error {
|
func (b *Api) handleMessages(c echo.Context) error {
|
||||||
b.Lock()
|
b.Lock()
|
||||||
defer b.Unlock()
|
defer b.Unlock()
|
||||||
for _, msg := range b.Messages.Values() {
|
c.JSONPretty(http.StatusOK, b.Messages.Values(), " ")
|
||||||
c.JSONPretty(http.StatusOK, msg, " ")
|
|
||||||
}
|
|
||||||
b.Messages = ring.Ring{}
|
b.Messages = ring.Ring{}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user