diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-12-25 18:13:55 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-12-28 11:41:16 +0200 |
commit | 83d42c1518274dc0af0f49fda3a10e846569cbcc (patch) | |
tree | facd227c6b8fcc4bc92b43bb2b3dcf30b45f7dc0 /app | |
parent | fd231ff9fb6292c2fd15f71c5329216e67935560 (diff) | |
download | gitlab-ce-83d42c1518274dc0af0f49fda3a10e846569cbcc.tar.gz |
Revert upvotes and downvotes params to MR API
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/issuable.rb | 6 | ||||
-rw-r--r-- | app/models/note.rb | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 919833f6df5..18a00f95b48 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -95,14 +95,12 @@ module Issuable opened? || reopened? end - # Deprecated. Still exists to preserve API compatibility. def downvotes - 0 + notes.awards.where(note: "thumbsdown").count end - # Deprecated. Still exists to preserve API compatibility. def upvotes - 0 + notes.awards.where(note: "thumbsup").count end def subscribed?(user) diff --git a/app/models/note.rb b/app/models/note.rb index 1222d99cf1f..1ca86b2592f 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -346,12 +346,10 @@ class Note < ActiveRecord::Base read_attribute(:system) end - # Deprecated. Still exists to preserve API compatibility. def downvote? false end - # Deprecated. Still exists to preserve API compatibility. def upvote? false end |