diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:56:15 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:56:15 +0200 |
commit | b8066e2cd0c8ae8384b68c81ea3a6c071cd44c51 (patch) | |
tree | 6d2df4afbcfc335ac5dcb4b3ab3877e441827360 /lib/api | |
parent | 72c552c2d4ea985a9ab1470ba2e44fc7e52673d9 (diff) | |
download | gitlab-ce-b8066e2cd0c8ae8384b68c81ea3a6c071cd44c51.tar.gz |
No more web url
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index c1b0cece344..dcfd7a8e1a7 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -5,7 +5,11 @@ module API end class UserBasic < UserSafe - expose :id, :state, :avatar_url, :web_url + expose :id, :state, :avatar_url + + expose :web_url do |user, options| + Rails.application.routes.url_helpers.user_url(user) + end end class User < UserBasic @@ -70,7 +74,11 @@ module API class Group < Grape::Entity expose :id, :name, :path, :description - expose :avatar_url, :web_url + expose :avatar_url + + expose :web_url do |group, options| + Rails.application.routes.url_helpers.group_url(group) + end end class GroupDetail < Group |