Remove API redirect

This commit is contained in:
hakanensari 2013-04-29 23:56:16 +01:00
parent 2ca8c06af6
commit 804572f0b8

View File

@ -6,12 +6,6 @@ require 'yajl'
set :root, File.expand_path('..', File.dirname(__FILE__))
helpers do
def redirect_to_api
if request.url.include? 'https://f'
redirect request.url.sub %r{//}, '//api.'
end
end
# Ugly as fuck.
def snapshot
quotes = Snapshot
@ -32,15 +26,9 @@ get '/' do
end
get '/latest' do
redirect_to_api if production?
jsonp snapshot
end
get '/:date' do
redirect_to_api if production?
jsonp snapshot
end
error do
"Something is rotten in the state of Denmark."
end