diff options
author | Rémy Coutable <remy@rymai.me> | 2018-06-06 10:50:34 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-06-06 10:50:34 +0000 |
commit | f4b03f0992d39db9f9f77798cb285d732c352074 (patch) | |
tree | 51bc0ace569b24a49910c02e0d918c90317f9685 /lib/api/entities.rb | |
parent | 71242199a2c4a8130e02d51bc97cb505f6768e52 (diff) | |
parent | c8f0e4b5da0c9d578035e74b524f5adcb80efcf6 (diff) | |
download | gitlab-ce-f4b03f0992d39db9f9f77798cb285d732c352074.tar.gz |
Merge branch '45821-avatar_api' into 'master'
Add Avatar API
Closes #45821
See merge request gitlab-org/gitlab-ce!19121
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 c76d3ff45d0..22afcb9edf2 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -694,6 +694,12 @@ module API expose :notes, using: Entities::Note end + class Avatar < Grape::Entity + expose :avatar_url do |avatarable, options| + avatarable.avatar_url(only_path: false, size: options[:size]) + end + end + class AwardEmoji < Grape::Entity expose :id expose :name |