* VRFS-2839 - add check to admin

This commit is contained in:
Seth Call 2015-02-25 22:04:58 -06:00
parent 471f590ef7
commit 6107622f79
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
class ChecksController < ApplicationController
#respond_to :json
# create or update a client_artifact row
def check_latency_tester
latency_tester_name = params[:name]
exists = Connection.where(client_type: Connection::TYPE_LATENCY_TESTER).where(client_id: latency_tester_name).first
if exists
render :text => "", :status => :ok
else
render :text => "", :status => 404
end
end
end

View File

@ -32,6 +32,7 @@ JamAdmin::Application.routes.draw do
match '/api/artifacts' => 'artifacts#update_artifacts', :via => :post
match '/api/mix/:id/enqueue' => 'admin/mixes#mix_again', :via => :post
match '/api/checks/latency_tester' => 'checks#check_latency_tester', :via => :get
mount Resque::Server.new, :at => "/resque"