gitlab-org--gitlab-foss/app/services/clusters/update_service.rb
Thong Kuah 19e1024bb8 Pass in project as kwarg for CreateService
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.
2018-10-15 11:01:09 +13:00

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