19e1024bb8
This enables us to have other options in the future such as passing in `group:`. Also, remove project arg from UpdateService, as un-used. This will help group cluster controller to re-use this services.
15 lines
282 B
Ruby
15 lines
282 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Clusters
|
|
class UpdateService
|
|
attr_reader :current_user, :params
|
|
|
|
def initialize(user = nil, params = {})
|
|
@current_user, @params = user, params.dup
|
|
end
|
|
|
|
def execute(cluster)
|
|
cluster.update(params)
|
|
end
|
|
end
|
|
end
|