修改版本发布的bug

dev_forge
sylor_huang@126.com 5 years ago
parent 0b0a3d1fc6
commit 0f0fc691d0

@ -329,7 +329,7 @@ class ApplicationController < ActionController::Base
def current_user
# User.current
if Rails.env.development?
user_id = 50207
user_id = 36390
else
user_id = 130328
end

@ -223,7 +223,10 @@ class IssuesController < ApplicationController
}
if params[:issue_tag_ids].present? && !@issue&.issue_tags_relates.where(issue_tag_id: params[:issue_tag_ids]).exists?
@issue&.issue_tags_relates&.delete_all
@issue&.issue_tags_relates&.destroy_all
params[:issue_tag_ids].each do |tag|
IssueTagsRelate.create(issue_id: @issue.id, issue_tag_id: tag)
end
end
if @issue.update_attributes(issue_params)
@ -258,12 +261,6 @@ class IssuesController < ApplicationController
# end
# end
if params[:issue_tag_ids].present?
params[:issue_tag_ids].each do |tag|
IssueTagsRelate.create(issue_id: @issue.id, issue_tag_id: tag)
end
end
if params[:status_id].to_i == 5
@issue.issue_times.update_all(end_time: Time.now)
end

@ -10,7 +10,7 @@ class Gitea::Versions::DeleteService < Gitea::ClientService
def call
response = delete(url, params)
render_result(response)
return response
end
private
@ -23,14 +23,4 @@ class Gitea::Versions::DeleteService < Gitea::ClientService
"/repos/#{@user_name}/#{@repo}/releases/#{@version_gid}".freeze
end
def render_result(response)
body = JSON.parse(response.body)
case response.status
when 204
body
else
{status: -1, message: "#{body['message']}"}
end
end
end

@ -19,7 +19,7 @@ class Gitea::Versions::UpdateService < Gitea::ClientService
end
def call
put(url, request_params)
patch(url, request_params)
end
private

Loading…
Cancel
Save