mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-17 10:15:57 +08:00
新增: 批量更改文件
This commit is contained in:
13
app/controllers/api/v1/projects/contents_controller.rb
Normal file
13
app/controllers/api/v1/projects/contents_controller.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Api::V1::Projects::ContentsController < Api::V1::BaseController
|
||||
before_action :require_operate_above, only: [:batch]
|
||||
|
||||
def batch
|
||||
@result_object = Api::V1::Projects::Contents::BatchCreateService.call(@project, batch_content_params, current_user&.gitea_token)
|
||||
puts @result_object
|
||||
end
|
||||
|
||||
private
|
||||
def batch_content_params
|
||||
params.require(:content).permit(:author_email, :author_name, :author_timeunix, :branch, :committer_email, :committer_name, :committer_timeunix, :message, :new_branch, files: [ :action_type, :content, :encoding, :file_path])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user