forked from Gitlink/forgeplus
add: operate permission and request timeout
This commit is contained in:
parent
3eccd6be64
commit
5d771c824b
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue