diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-31 15:34:53 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-31 15:34:53 +0300 |
commit | 51e5f379dd69837d3405c78e5ef6ce3727939f3c (patch) | |
tree | ec0404f8af61a712c25fb43a4bf21e2ff0349098 /lib/api | |
parent | 1c7a8b8c27398250983bf4329007f6971df65f34 (diff) | |
parent | a51a3fb8ed92a58b375125b19f75c3d4c545571a (diff) |
Merge branch 'master' into api-useremails
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 ce3d09a32cd..b5556682449 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 @@ -63,6 +67,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 @@ -73,6 +78,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 |