summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-05-13 23:20:16 +0000
committerDouwe Maan <douwe@gitlab.com>2016-05-13 23:20:16 +0000
commitc3acc8222e8e084946366987745d03031ca44636 (patch)
tree921b1155cea4ae5185ccae5040b75015e860be50 /lib/api/entities.rb
parent61756ecca91b2aaed0a29fcc796e50f55cceab9e (diff)
parent876dc7bacb5c2835537d13dfedd2f7ed55463c6b (diff)
downloadgitlab-ce-c3acc8222e8e084946366987745d03031ca44636.tar.gz
Merge branch 'refactor-diff-notes' into 'master'
Refactor diff notes Related to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4101 /cc @rspeicher See merge request !4110
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 406f5ea9139..93a5798e21e 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -227,9 +227,9 @@ module API
class CommitNote < Grape::Entity
expose :note
- expose(:path) { |note| note.diff_file_name }
- expose(:line) { |note| note.diff_new_line }
- expose(:line_type) { |note| note.diff_line_type }
+ expose(:path) { |note| note.diff_file_path if note.legacy_diff_note? }
+ expose(:line) { |note| note.diff_new_line if note.legacy_diff_note? }
+ expose(:line_type) { |note| note.diff_line_type if note.legacy_diff_note? }
expose :author, using: Entities::UserBasic
expose :created_at
end