refactor: memo store (#1741)

This commit is contained in:
boojack
2023-05-25 21:50:37 +08:00
committed by GitHub
parent 43819b021e
commit ea728d232d
16 changed files with 528 additions and 543 deletions

View File

@ -8,6 +8,7 @@ import (
"time"
"github.com/usememos/memos/api"
"github.com/usememos/memos/store"
"github.com/labstack/echo/v4"
)
@ -82,7 +83,7 @@ func (s *Server) registerMemoResourceRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Resource ID is not a number: %s", c.Param("resourceId"))).SetInternal(err)
}
memo, err := s.Store.FindMemo(ctx, &api.MemoFind{
memo, err := s.Store.GetMemo(ctx, &store.FindMemoMessage{
ID: &memoID,
})
if err != nil {