From c00d885e537dce0b10e3f226270ed8ad8abef950 Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 11 Nov 2024 11:22:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20compare=20=E6=96=87=E4=BB=B6=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AF=A6=E6=83=85=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/v1/projects/compare/files.json.jbuilder | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/views/api/v1/projects/compare/files.json.jbuilder b/app/views/api/v1/projects/compare/files.json.jbuilder index 7af83f0f7..cab1a19fc 100644 --- a/app/views/api/v1/projects/compare/files.json.jbuilder +++ b/app/views/api/v1/projects/compare/files.json.jbuilder @@ -1,16 +1,5 @@ if params[:filepath].present? - json.commits_count @compare_result['CommitsCount'] - json.last_commit_sha @compare_result['LatestSha'] - json.commits @compare_result['Commits'] do |commit| - json.partial! 'api/v1/projects/compare/simple_gitea_commit', locals: { commit: commit} - end - json.diff do - if @compare_result['Diff'].present? - json.partial! "api/v1/projects/simple_gitea_diff_detail", diff: @compare_result['Diff'] - else - json.nil! - end - end + json.partial! "api/v1/projects/simple_gitea_diff_detail", diff: @compare_result['Diff'] else json.file_nums @compare_result[:total_data].to_i json.total_addition @compare_result[:data]["total_addition"]