Merge pull request '调整repositories/replace_file 返回数据' (#47) from KingChan/forgeplus:chenjing into standalone_develop
This commit is contained in:
commit
7b9aeee888
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue