diff --git a/server/memo.go b/server/memo.go index a99dadd7..c7bc71fd 100644 --- a/server/memo.go +++ b/server/memo.go @@ -199,7 +199,7 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { } c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8) - if err := json.NewEncoder(c.Response().Writer).Encode(len(memoList)); err != nil { + if err := json.NewEncoder(c.Response().Writer).Encode(composeResponse(len(memoList))); err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to encode memo amount").SetInternal(err) } diff --git a/server/tag.go b/server/tag.go index 4cc90af5..319af37e 100644 --- a/server/tag.go +++ b/server/tag.go @@ -42,7 +42,7 @@ func (s *Server) registerTagRoutes(g *echo.Group) { } c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8) - if err := json.NewEncoder(c.Response().Writer).Encode(tagList); err != nil { + if err := json.NewEncoder(c.Response().Writer).Encode(composeResponse(tagList)); err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to encode tags response").SetInternal(err) } diff --git a/store/memo.go b/store/memo.go index cc500987..e99120c5 100644 --- a/store/memo.go +++ b/store/memo.go @@ -221,8 +221,6 @@ func findMemoRawList(db *sql.DB, find *api.MemoFind) ([]*memoRaw, error) { } } - println(pagination) - rows, err := db.Query(` SELECT id,