Unverified Commit 11aa01ee authored by Athurg Gooth's avatar Athurg Gooth Committed by GitHub

fix: visibility param override the user auth state (#1941)

fix visibility param override the user auth state
parent d8b6e928
......@@ -541,14 +541,6 @@ func (s *APIV1Service) registerMemoRoutes(g *echo.Group) {
}
findMemoMessage.ContentSearch = contentSearch
visibilityListStr := c.QueryParam("visibility")
if visibilityListStr != "" {
visibilityList := []store.Visibility{}
for _, visibility := range strings.Split(visibilityListStr, ",") {
visibilityList = append(visibilityList, store.Visibility(visibility))
}
findMemoMessage.VisibilityList = visibilityList
}
if limit, err := strconv.Atoi(c.QueryParam("limit")); err == nil {
findMemoMessage.Limit = &limit
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment