mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: user api
This commit is contained in:
@@ -63,6 +63,17 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {
|
||||
memoFind := &api.MemoFind{
|
||||
CreatorId: &userId,
|
||||
}
|
||||
showHiddenMemo, err := strconv.ParseBool(c.QueryParam("hidden"))
|
||||
if err != nil {
|
||||
showHiddenMemo = false
|
||||
}
|
||||
|
||||
rowStatus := "NORMAL"
|
||||
if showHiddenMemo {
|
||||
rowStatus = "HIDDEN"
|
||||
}
|
||||
memoFind.RowStatus = &rowStatus
|
||||
|
||||
list, err := s.MemoService.FindMemoList(memoFind)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch memo list").SetInternal(err)
|
||||
|
Reference in New Issue
Block a user