fix: user api

This commit is contained in:
email
2022-02-04 21:24:21 +08:00
parent 3fa918169e
commit 825bea59f0
9 changed files with 82 additions and 21 deletions

View File

@@ -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)