Commit 184e67da authored by Alfredo Sumaran's avatar Alfredo Sumaran

Expose edit and leave path for groups endpoint

parent b4253735
class GroupEntity < Grape::Entity
include RequestAwareEntity
include MembersHelper
expose :id, :name, :path, :description, :visibility
expose :avatar_url
......@@ -13,4 +14,12 @@ class GroupEntity < Grape::Entity
group.group_members.find_by(user_id: request.current_user)&.access_level
end
end
expose :edit_path do |group|
edit_group_path(group)
end
expose :leave_path do |group|
leave_group_group_members_path(group)
end
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