diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index f729ab394..66b30eef8 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -219,6 +219,7 @@ class RepositoriesController < ApplicationController interactor = Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) if interactor.success? @file = interactor.result + render_result(0, "替换成功") else render_error(interactor.error) end diff --git a/app/views/repositories/replace_file.json.jbuilder b/app/views/repositories/replace_file.json.jbuilder deleted file mode 100644 index 5687ee731..000000000 --- a/app/views/repositories/replace_file.json.jbuilder +++ /dev/null @@ -1,11 +0,0 @@ -json.name @file['content']['name'] -json.sha @file['content']['sha'] -json.size @file['content']['size'] -json.content @file['content']['content'] -json.encoding @file['content']['encoding'] -json.pr_id @pull_issue.try(:id) -json.commit do - json.message @file['commit']['message'] - json.author @file['commit']['author'] - json.committer @file['commit']['committer'] -end