# 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
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