summaryrefslogtreecommitdiff
path: root/app/serializers/diff_file_base_entity.rb
diff options
context:
space:
mode:
authorNatalia Tepluhina <ntepluhina@gitlab.com>2019-02-15 17:56:50 +0000
committerPhil Hughes <me@iamphill.com>2019-02-15 17:56:50 +0000
commitbf8f32da7ffc0c8490e1920152fd1dfd214747ba (patch)
treeba550b0c4cc67cd6d09211c14ed6f5c9befbb40f /app/serializers/diff_file_base_entity.rb
parent8f209ed5eac176fde0272ced69e36467e37fe79a (diff)
downloadgitlab-ce-bf8f32da7ffc0c8490e1920152fd1dfd214747ba.tar.gz
Replaced part of diff file properties with diff viewer
- replaced file.too_large - replaced file.text - replaced file.collapsed
Diffstat (limited to 'app/serializers/diff_file_base_entity.rb')
-rw-r--r--app/serializers/diff_file_base_entity.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/serializers/diff_file_base_entity.rb b/app/serializers/diff_file_base_entity.rb
index 06a8db78476..ede9e04b722 100644
--- a/app/serializers/diff_file_base_entity.rb
+++ b/app/serializers/diff_file_base_entity.rb
@@ -72,17 +72,20 @@ class DiffFileBaseEntity < Grape::Entity
expose :old_path
expose :new_path
expose :new_file?, as: :new_file
- expose :collapsed?, as: :collapsed
- expose :text?, as: :text
+ expose :renamed_file?, as: :renamed_file
+ expose :deleted_file?, as: :deleted_file
+
expose :diff_refs
+
expose :stored_externally?, as: :stored_externally
expose :external_storage
- expose :renamed_file?, as: :renamed_file
- expose :deleted_file?, as: :deleted_file
+
expose :mode_changed?, as: :mode_changed
expose :a_mode
expose :b_mode
+ expose :viewer, using: DiffViewerEntity
+
private
def memoized_submodule_links(diff_file)