forked from OpenNeo/impress
Remove the now-unused pets#submit action
This was used by the Neopia server to send us the modeling data it requested out-of-band. But now we do all our modeling requests back in-app again, so we don't need this!
This commit is contained in:
parent
d8b0bf3174
commit
2c98c1c636
3 changed files with 0 additions and 16 deletions
|
@ -40,11 +40,6 @@ class ApplicationController < ActionController::Base
|
|||
http_accept_language.language_region_compatible_from(I18n.public_locales.map(&:to_s)) ||
|
||||
I18n.default_locale
|
||||
end
|
||||
|
||||
PRIVATE_IP_BLOCK = IPAddr.new('192.168.0.0/16')
|
||||
def local_only
|
||||
raise AccessDenied unless request.ip == '127.0.0.1' || PRIVATE_IP_BLOCK.include?(request.ip)
|
||||
end
|
||||
|
||||
def localized_fragment_exist?(key)
|
||||
localized_key = localize_fragment_key(key, locale)
|
||||
|
|
|
@ -3,9 +3,6 @@ class PetsController < ApplicationController
|
|||
rescue_from PetType::DownloadError, SwfAsset::DownloadError, :with => :asset_download_error
|
||||
rescue_from Pet::DownloadError, :with => :pet_download_error
|
||||
|
||||
protect_from_forgery except: :submit
|
||||
before_action :local_only, only: :submit
|
||||
|
||||
def load
|
||||
if params[:name] == '!'
|
||||
redirect_to roulette_path
|
||||
|
@ -30,13 +27,6 @@ class PetsController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def submit
|
||||
viewer_data = HashWithIndifferentAccess.new(JSON.parse(params[:viewer_data]))
|
||||
@pet = Pet.from_viewer_data(viewer_data, :item_scope => Item.includes(:translations))
|
||||
@user = params[:user_id].present? ? User.find(params[:user_id]) : nil
|
||||
render json: {points: contribute(@user, @pet)}
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ OpenneoImpressItems::Application.routes.draw do
|
|||
get '/users/current-user/outfits', to: redirect('/your-outfits')
|
||||
|
||||
post '/pets/load' => 'pets#load', :as => :load_pet
|
||||
post '/pets/submit' => 'pets#submit', :method => :post
|
||||
get '/modeling' => 'pets#bulk', :as => :bulk_pets
|
||||
|
||||
devise_for :auth_users
|
||||
|
|
Loading…
Reference in a new issue