From bbacebc1c9bcb2e9c9268cd1defa2611414594ec Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 6 Jul 2023 16:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/interactors/gitea/update_file_interactor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/interactors/gitea/update_file_interactor.rb b/app/interactors/gitea/update_file_interactor.rb index 3691529e0..0487a1ea0 100644 --- a/app/interactors/gitea/update_file_interactor.rb +++ b/app/interactors/gitea/update_file_interactor.rb @@ -25,7 +25,6 @@ module Gitea def run Contents::UpdateForm.new(valid_params).validate! response = Gitea::Repository::Entries::UpdateService.new(token, owner, @params[:identifier], file_path, file_params).call - Rails.logger.info("Gitea::Repository::Entries::UpdateService======#{response.body}") render_result(response) rescue Exception => exception fail!(exception.message) @@ -43,6 +42,9 @@ module Gitea def render_result(response) if response.status == 200 @result = JSON.parse(response.body) + else + Rails.logger.info("Gitea::Repository::Entries::UpdateService error======#{response.body}") + @error = "更新失败" end end