diff options
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 8f54d0d4d84..8557fa074d4 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -6,6 +6,12 @@ module API expose :is_admin?, as: :is_admin expose :can_create_group?, as: :can_create_group expose :can_create_project?, as: :can_create_project + + expose :avatar_url do |user, options| + if user.avatar.present? + user.avatar.url + end + end end class UserSafe < Grape::Entity |