Browse Source

文件的更新和删除返回值

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
487a81e461
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/repositories_controller.rb

+ 2
- 1
app/controllers/repositories_controller.rb 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


Loading…
Cancel
Save