mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 11:50:49 +08:00
add: operate permission and request timeout
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
class Traces::ProjectsController < Traces::BaseController
|
||||
include OperateProjectAbilityAble
|
||||
|
||||
before_action :require_login
|
||||
before_action :load_project
|
||||
before_action :authorizate_user_can_edit_project!
|
||||
|
||||
def tasks
|
||||
branch_name = params[:branch_name]
|
||||
|
||||
@@ -18,6 +18,7 @@ class Trace::ClientService < ApplicationService
|
||||
url = URI("#{full_url(url)}")
|
||||
http = Net::HTTP.new(url.host, url.port)
|
||||
request = Net::HTTP::Post.new(url)
|
||||
request.read_timeout = 1200
|
||||
request["Authorization"] = token
|
||||
form_data = params[:data].stringify_keys.to_a
|
||||
request.set_form form_data, 'multipart/form-data'
|
||||
|
||||
Reference in New Issue
Block a user