diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/award_emoji.rb | 8 | ||||
-rw-r--r-- | lib/api/v3/award_emoji.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb index af16e016cdb..f9e0c2c4e16 100644 --- a/lib/api/award_emoji.rb +++ b/lib/api/award_emoji.rb @@ -4,15 +4,15 @@ module API before { authenticate! } AWARDABLES = [ - { type: 'issue', reference_by: :iid }, - { type: 'merge_request', reference_by: :iid }, - { type: 'snippet', reference_by: :id } + { type: 'issue', find_by: :iid }, + { type: 'merge_request', find_by: :iid }, + { type: 'snippet', find_by: :id } ].freeze resource :projects do AWARDABLES.each do |awardable_params| awardable_string = awardable_params[:type].pluralize - awardable_id_string = "#{awardable_params[:type]}_#{awardable_params[:reference_by]}" + awardable_id_string = "#{awardable_params[:type]}_#{awardable_params[:find_by]}" params do requires :id, type: String, desc: 'The ID of a project' diff --git a/lib/api/v3/award_emoji.rb b/lib/api/v3/award_emoji.rb index c558c745b8c..cf9e1551f60 100644 --- a/lib/api/v3/award_emoji.rb +++ b/lib/api/v3/award_emoji.rb @@ -84,7 +84,7 @@ module API unauthorized! unless award.user == current_user || current_user.admin? award.destroy - present award, with: ::API::Entities::AwardEmoji + present award, with: Entities::AwardEmoji end end end |