mirror of
https://github.com/usememos/memos.git
synced 2025-03-24 06:30:09 +01:00
fix: remove memo list api (#1151)
This commit is contained in:
parent
904a6bd97f
commit
6e2e7ac782
@ -334,23 +334,6 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {
|
||||
return c.JSON(http.StatusOK, composeResponse(resourceList))
|
||||
})
|
||||
|
||||
g.GET("/memo/amount", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
normalRowStatus := api.Normal
|
||||
memoFind := &api.MemoFind{
|
||||
RowStatus: &normalRowStatus,
|
||||
}
|
||||
if userID, err := strconv.Atoi(c.QueryParam("userId")); err == nil {
|
||||
memoFind.CreatorID = &userID
|
||||
}
|
||||
|
||||
memoList, err := s.Store.FindMemoList(ctx, memoFind)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find memo list").SetInternal(err)
|
||||
}
|
||||
return c.JSON(http.StatusOK, composeResponse(memoList))
|
||||
})
|
||||
|
||||
g.GET("/memo/stats", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
normalStatus := api.Normal
|
||||
|
Loading…
x
Reference in New Issue
Block a user