let sort = SortType::from_str(&self.sort).expect("listing sort");
- let communities: Vec<CommunityView> = CommunityView::list(&conn, user_id, sort, self.page, Some(9999)).unwrap();
+ let communities: Vec<CommunityView> = CommunityView::list(&conn, user_id, sort, self.page, self.limit).unwrap();
// Return the jwt
serde_json::to_string(
);
let listCommunitiesForm: ListCommunitiesForm = {
- sort: SortType[SortType.TopAll]
+ sort: SortType[SortType.TopAll],
+ limit: 9999,
}
WebSocketService.Instance.listCommunities(listCommunitiesForm);
let listCommunitiesForm: ListCommunitiesForm = {
sort: SortType[SortType.New],
- limit: 8
+ limit: 6
}
WebSocketService.Instance.listCommunities(listCommunitiesForm);
);
let listCommunitiesForm: ListCommunitiesForm = {
- sort: SortType[SortType.TopAll]
+ sort: SortType[SortType.TopAll],
+ limit: 9999,
}
WebSocketService.Instance.listCommunities(listCommunitiesForm);