From 6b5198823efbe8514841d2218b2f6452b5b76fb8 Mon Sep 17 00:00:00 2001 From: Felipe Cavalcanti Date: Wed, 14 Sep 2016 02:06:34 -0300 Subject: [PATCH] fix bug in returning history --- app/history.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/history.go b/app/history.go index be64dd5..fbcf50e 100644 --- a/app/history.go +++ b/app/history.go @@ -1,7 +1,6 @@ package app import ( - "encoding/json" "fmt" "net/http" "reflect" @@ -60,8 +59,7 @@ func HistoryHandler(app *App) func(c echo.Context) error { messages = append(messages, t) } } - jsonMessages, _ := json.Marshal(messages) - return c.JSON(http.StatusOK, jsonMessages) + return c.JSON(http.StatusOK, messages) } else { return c.String(echo.ErrUnauthorized.Code, echo.ErrUnauthorized.Message) }