Commit 75ac425c authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'sh-optimize-project-commit-api' into 'master'

Optimize creation of commit API by using Repository#commit instead of Repository#commits

See merge request !12623
parents 47e9db8b 2a9c2fec
---
title: Optimize creation of commit API by using Repository#commit instead of Repository#commits
merge_request:
author:
......@@ -67,7 +67,7 @@ module API
result = ::Files::MultiService.new(user_project, current_user, attrs).execute
if result[:status] == :success
commit_detail = user_project.repository.commits(result[:result], limit: 1).first
commit_detail = user_project.repository.commit(result[:result])
present commit_detail, with: Entities::RepoCommitDetail
else
render_api_error!(result[:message], 400)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment