Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jfontan committed Dec 9, 2011
1 parent 27720db commit 9993c81
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions server/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,12 @@
send_file 'static/index.html'
end

# assets
=begin
get '/new' do
send_file 'static/index.html'
end
get %r{^.*/js/jquery.js$} do
send_file 'server/assets/jquery.js'
end
get %r{^.*/js/helpers.js$} do
send_file 'server/assets/helpers.js'
end
get %r{^.*/js/glsl.js$} do
send_file 'static/js/glsl.js'
end
get %r{^.*/js/codemirror.js$} do
send_file 'static/js/codemirror.js'
end
get %r{^.*/css/codemirror.css$} do
send_file 'static/css/codemirror.css'
end
get %r{^.*/css/default.css$} do
send_file 'static/css/default.css'
end
get %r{^.*/js/lzma.js$} do
"\n"
end
get %r{^/(\d+)(/(\d+))?$} do
send_file 'static/index.html'
end
Expand All @@ -89,26 +59,6 @@
$glsl.get_code_json(code_id, version_id)
end

post %r{^/(new)$} do
body=request.body.read

$glsl.save_new_effect(body)
end


post %r{^/(\d+)(/(\d+))?$} do
code_id=params[:captures][0].to_i
body=request.body.read

$glsl.save_version(code_id, body)

code=$glsl.get_code(code_id)

version=code['versions'].length-1

"#{code_id}/#{version}"
end

post '/e' do
body=request.body.read
$glsl.save_effect(body)
Expand Down

0 comments on commit 9993c81

Please sign in to comment.