Optimize Clusters::CreateService#execute
This commit is contained in:
parent
6b1ad363dc
commit
f17375b9d0
|
@ -11,7 +11,7 @@ class Projects::Clusters::UserController < Projects::ApplicationController
|
|||
def create
|
||||
@cluster = ::Clusters::CreateService
|
||||
.new(project, current_user, create_params)
|
||||
.execute(nil)
|
||||
.execute
|
||||
|
||||
if @cluster.persisted?
|
||||
redirect_to project_cluster_path(project, @cluster)
|
||||
|
|
|
@ -2,7 +2,7 @@ module Clusters
|
|||
class CreateService < BaseService
|
||||
attr_reader :access_token
|
||||
|
||||
def execute(access_token)
|
||||
def execute(access_token = nil)
|
||||
@access_token = access_token
|
||||
|
||||
create_cluster.tap do |cluster|
|
||||
|
|
Loading…
Reference in New Issue