change response for replace file

This commit is contained in:
chenjing 2023-05-06 15:00:06 +08:00
parent 4c1bcd87a2
commit b86ea02dc9
2 changed files with 1 additions and 11 deletions

View File

@ -219,6 +219,7 @@ class RepositoriesController < ApplicationController
interactor = Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) interactor = Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params)
if interactor.success? if interactor.success?
@file = interactor.result @file = interactor.result
render_result(0, "替换成功")
else else
render_error(interactor.error) render_error(interactor.error)
end end

View File

@ -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