change diff_result.diff to diff_result[0].diff

This commit is contained in:
nigel007 2019-05-26 11:27:12 +08:00
parent ecba5eaae4
commit a01fa6ab00
1 changed files with 1 additions and 2 deletions

View File

@ -89,10 +89,9 @@ module Mobile
if owner
project = Project.find_by_user_id_name(owner.id, params[:reponame])
if project
Rails.logger.info "project found"
g = Gitlab.client # 用于通过gitlab api进行查询
diff_result = g.commit_diff(project.id, params[:oldHash])
Rails.logger.info diff_result.diff
Rails.logger.info diff_result[0].diff
else
Rails.logger.info "project not found"
end