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:
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index ffff40141de..63a7fdfa3ab 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -169,7 +169,7 @@ module API
not_found! 'Commit' unless commit
- raw_diffs = ::Kaminari.paginate_array(commit.raw_diffs.to_a)
+ raw_diffs = ::Kaminari.paginate_array(commit.diffs(expanded: true).diffs.to_a)
present paginate(raw_diffs), with: Entities::Diff
end
@@ -223,7 +223,7 @@ module API
present user_project.repository.commit(result[:result]),
with: Entities::Commit
else
- render_api_error!(result[:message], 400)
+ error!(result.slice(:message, :error_code), 400, header)
end
end
@@ -257,7 +257,7 @@ module API
present user_project.repository.commit(result[:result]),
with: Entities::Commit
else
- render_api_error!(result[:message], 400)
+ error!(result.slice(:message, :error_code), 400, header)
end
end