Commit d8149c08 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'update-geo-node-service' into 'master'

Use NodeUpdateService in update API

Closes #199112

See merge request gitlab-org/gitlab!23894
parents f9ffb242 184163c3
---
title: Use NodeUpdateService for updating Geo node
merge_request: 23894
author: Rajendra Kadam
type: changed
......@@ -10,7 +10,7 @@ module Geo
@old_shards = geo_node.selective_sync_shards
@params = params.dup
@params[:namespace_ids] = @params[:namespace_ids].to_s.split(',')
@params[:namespace_ids] = @params[:namespace_ids].to_s.split(',') if @params[:namespace_ids].is_a? String
end
def execute
......
......@@ -193,7 +193,9 @@ module API
update_params = declared_params(include_missing: false)
if geo_node.update(update_params)
updated_geo_node = ::Geo::NodeUpdateService.new(geo_node, update_params).execute
if updated_geo_node
present geo_node, with: EE::API::Entities::GeoNode
else
render_validation_error!(geo_node)
......
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