Commit f17375b9 authored by Shinya Maeda's avatar Shinya Maeda

Optimize Clusters::CreateService#execute

parent 6b1ad363
......@@ -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|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment