Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-03-02 13:41:59 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-03-07 11:26:00 +0300
commit6384bf7a8804b41110bcbdf5e18f124dfcffca2e (patch)
tree07f8e74bb052cf8f82c4973f98ce25d87794e2d2 /lib/api/award_emoji.rb
parent72ef8af7586b349df04fc722206c5eecb3ac58f6 (diff)
Implement review comments from @dbalexandre
- Typo in docs - Newline between test/expectation in `api/issues_spec` - Use `find_by` instead of `reference_by` in the structure defining awardables
Diffstat (limited to 'lib/api/award_emoji.rb')
-rw-r--r--lib/api/award_emoji.rb8
1 files changed, 4 insertions, 4 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'