修改bug

This commit is contained in:
sylor_huang@126.com 2020-06-05 10:07:50 +08:00
parent 497962fc97
commit ba93347df8
3 changed files with 1 additions and 19 deletions

View File

@ -92,24 +92,6 @@ class RepositoriesController < ApplicationController
end
end
def upload_file
file_ids = params[:attachment_ids]
if file_ids.present?
file_ids.each do |id|
attachment = Attachment.select(:id, :filename, :disk_directory, :disk_filename).find_by(id)
file_path = attachemnt&.diskfile.to_s
unless File.exists?(file_path)
file_content = File.open(file_path)
end
end
else
render_error("请上传文件")
end
files.each do
end
def repo_hook
hook_type = request.headers["X-Gitea-Event"].to_s # 获取推送的方式
ownername = @project.owner.try(:login)

View File

@ -53,7 +53,7 @@ module Gitea
def file_params
file_params = {}
file_params = file_params.merge(branch: @params[:branch]) unless @params[:branch].blank? || @params[:new_branch].present?
file_params = file_params.merge(branch: @params[:branch]) unless (@params[:branch].blank? || @params[:new_branch].present?)
file_params = file_params.merge(new_branch: @params[:new_branch]) unless @params[:new_branch].blank?
file_params = file_params.merge(content: Base64.encode64(@params[:content]))
file_params = file_params.merge(message: @params[:message]) unless @params[:message].blank?

BIN
dump.rdb

Binary file not shown.