chore: use tx for stores

This commit is contained in:
boojack
2022-08-07 10:17:12 +08:00
parent 8c28721839
commit d8e10ba399
9 changed files with 279 additions and 197 deletions

View File

@ -14,6 +14,7 @@ import (
func (s *Server) registerTagRoutes(g *echo.Group) {
g.GET("/tag", func(c echo.Context) error {
ctx := c.Request().Context()
contentSearch := "#"
normalRowStatus := api.Normal
memoFind := api.MemoFind{
@ -39,7 +40,7 @@ func (s *Server) registerTagRoutes(g *echo.Group) {
}
}
memoList, err := s.Store.FindMemoList(&memoFind)
memoList, err := s.Store.FindMemoList(ctx, &memoFind)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find memo list").SetInternal(err)
}