X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5120666e073018f6821bab07f0bbb788098f97b1..bd855b0c92549d5cdcabc7a312166e4a6b556697:/services/api/app/controllers/arvados/v1/nodes_controller.rb diff --git a/services/api/app/controllers/arvados/v1/nodes_controller.rb b/services/api/app/controllers/arvados/v1/nodes_controller.rb index 73f1dee54a..eb72b7096d 100644 --- a/services/api/app/controllers/arvados/v1/nodes_controller.rb +++ b/services/api/app/controllers/arvados/v1/nodes_controller.rb @@ -3,19 +3,12 @@ # SPDX-License-Identifier: AGPL-3.0 class Arvados::V1::NodesController < ApplicationController - skip_before_filter :require_auth_scope, :only => :ping - skip_before_filter :find_object_by_uuid, :only => :ping - skip_before_filter :render_404_if_no_object, :only => :ping + skip_before_action :require_auth_scope, :only => :ping + skip_before_action :find_object_by_uuid, :only => :ping + skip_before_action :render_404_if_no_object, :only => :ping include DbCurrentTime - def update - if resource_attrs[:job_uuid].is_a? String - @object.job_readable = readable_job_uuids([resource_attrs[:job_uuid]]).any? - end - super - end - def self._ping_requires_parameters { ping_secret: {required: true} } end @@ -38,11 +31,15 @@ class Arvados::V1::NodesController < ApplicationController end def update + if resource_attrs[:job_uuid].is_a? String + @object.job_readable = readable_job_uuids([resource_attrs[:job_uuid]]).any? + end attrs_to_update = resource_attrs.reject { |k,v| [:kind, :etag, :href].index k } @object.update_attributes!(attrs_to_update) @object.assign_slot if params[:assign_slot] + @object.save! show end