文件的更新和删除返回值

This commit is contained in:
sylor_huang@126.com 2020-03-24 10:20:18 +08:00
parent 2f0e402af8
commit 487a81e461
1 changed files with 2 additions and 1 deletions

View File

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