chore: clean server

This commit is contained in:
email
2022-03-29 00:01:34 +08:00
parent 3c06c68691
commit 8f76120e4e
7 changed files with 21 additions and 51 deletions

View File

@@ -65,17 +65,11 @@ 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 := c.QueryParam("rowStatus")
if rowStatus != "" {
memoFind.RowStatus = &rowStatus
}
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)