Skip to content

Commit

Permalink
fix bug in returning history
Browse files Browse the repository at this point in the history
  • Loading branch information
felipejfc committed Sep 14, 2016
1 parent ae0f0ed commit 6b51988
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/history.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package app

import (
"encoding/json"
"fmt"
"net/http"
"reflect"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 6b51988

Please sign in to comment.