diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-31 15:29:23 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-31 15:29:23 +0300 |
commit | 04f2da3c37dfe0218033a2703afe35a0dc8d2686 (patch) | |
tree | 2761840f0c3c108762996b292e393a7d158d0fae /lib/api | |
parent | d9e26ca6d27f47ed2be922ccc6454a12f8ec87ac (diff) | |
parent | a51a3fb8ed92a58b375125b19f75c3d4c545571a (diff) |
Merge branch 'master' into comment-updated-by
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index ecf1412dee5..dcfd7a8e1a7 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -6,6 +6,10 @@ module API class UserBasic < UserSafe expose :id, :state, :avatar_url + + expose :web_url do |user, options| + Rails.application.routes.url_helpers.user_url(user) + end end class User < UserBasic @@ -59,6 +63,7 @@ module API expose :namespace expose :forked_from_project, using: Entities::ForkedFromProject, if: lambda{ | project, options | project.forked? } expose :avatar_url + expose :star_count, :forks_count end class ProjectMember < UserBasic @@ -69,6 +74,11 @@ module API class Group < Grape::Entity expose :id, :name, :path, :description + expose :avatar_url + + expose :web_url do |group, options| + Rails.application.routes.url_helpers.group_url(group) + end end class GroupDetail < Group |