Merge pull request '调整repositories/replace_file 返回数据' (#47) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
xxq250 2023-05-06 15:21:05 +08:00
commit 7b9aeee888
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)
if interactor.success?
@file = interactor.result
render_result(0, "替换成功")
else
render_error(interactor.error)
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