change response for replace file
This commit is contained in:
parent
4c1bcd87a2
commit
b86ea02dc9
|
@ -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
|
||||||
|
|
|
@ -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