mirror of
https://github.com/usememos/memos.git
synced 2025-04-13 00:52:07 +02: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))
|
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 {
|
g.GET("/memo/stats", func(c echo.Context) error {
|
||||||
ctx := c.Request().Context()
|
ctx := c.Request().Context()
|
||||||
normalStatus := api.Normal
|
normalStatus := api.Normal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user