app/controllers/bushido/data_controller.rb in bushido-0.0.25 vs app/controllers/bushido/data_controller.rb in bushido-0.0.26
- old
+ new
@@ -1,22 +1,22 @@
module Bushido
class DataController < ApplicationController
# PUT /bushido/data/
def index
@key = params.delete(:key)
- if ENV["BUSHIDO_KEY"] != @key
+ if ENV["BUSHIDO_APP_KEY"] != @key
respond_to do |format|
format.html { render :layout => false, :text => true, :status => :forbidden }
- format.json { render :status => :unprocessable_entity }
+ format.json { render :status => 401 }
return
end
+ end
puts "OMG GOT DATA FROM BUSHIBUS"
puts params.inspect
- Bushido::Data.fire(params)
+ Bushido::Data.fire('global', params)
respond_to do |format|
- format.json {render :json =>{'acknowledged' => true} :status => 200}
+ format.json {render :json => {'acknowledged' => true}, :status => 200}
end
- end
end
end
end