Commit e6569def authored by Douwe Maan's avatar Douwe Maan

Use through-relation instead of manually mapping.

parent ff3caad4
......@@ -9,8 +9,7 @@ module API
# GET /groups/:id/members
get ":id/members" do
group = find_group(params[:id])
members = group.group_members
users = (paginate members).collect(&:user)
users = group.users
present users, with: Entities::GroupMember, group: group
end
......
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