forked from Gitlink/forgeplus
文件的更新和删除返回值
This commit is contained in:
parent
2f0e402af8
commit
487a81e461
|
@ -57,10 +57,10 @@ class RepositoriesController < ApplicationController
|
|||
end
|
||||
|
||||
def update_file
|
||||
Rails.logger.info("##################_________params_____________#########{params}")
|
||||
interactor = Gitea::UpdateFileInteractor.call(current_user, params.merge(identifier: @project.identifier))
|
||||
if interactor.success?
|
||||
@file = interactor.result
|
||||
render_result(1, "更新成功")
|
||||
else
|
||||
render_error(interactor.error)
|
||||
end
|
||||
|
@ -70,6 +70,7 @@ class RepositoriesController < ApplicationController
|
|||
interactor = Gitea::DeleteFileInteractor.call(current_user, params.merge(identifier: @project.identifier))
|
||||
if interactor.success?
|
||||
@file = interactor.result
|
||||
render_result(1, "文件删除成功")
|
||||
else
|
||||
render_error(interactor.error)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue