diff options
author | davor <vorgrimmlerdavid@gmx.de> | 2012-03-20 14:00:54 +0100 |
---|---|---|
committer | davor <vorgrimmlerdavid@gmx.de> | 2012-03-20 14:00:54 +0100 |
commit | 0a59fae1679266281515a52f554b1533ebd330b0 (patch) | |
tree | 9fefe6862bc7b739da96b56c8cfdded0bd8100c0 | |
parent | 334568e596442d13e884dcabda3b1769bdfd898c (diff) |
Compound name.jl_dv
-rw-r--r-- | application.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/application.rb b/application.rb index fe04547..a5a2dfb 100644 --- a/application.rb +++ b/application.rb @@ -86,6 +86,9 @@ get %r{/(.+)} do |inchi| # catches all remaining get requests response['Content-Type'] = "text/plain" uri = File.join @@cactus_uri,@inchi,"names" RestClient.get(uri).body + when "text/list" + response['Content-Type'] = "text/list" + OpenTox::Compound.from_inchi(@inchi).to_names_hash.inspect else raise OpenTox::BadRequestError.new "Unsupported MIME type '#{request.env['HTTP_ACCEPT']}'" end |