diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-16 11:05:40 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-16 11:05:40 +0100 |
commit | 2ff8706dd7ee3a0e941c9d05ac3c1d4b3ff81c6e (patch) | |
tree | 0e6e558ad454377347d165af8f9b9ac865778342 | |
parent | 725519aeda427984906f9b2a3115615d8272c85c (diff) |
toxcreate adapted for new representation
-rw-r--r-- | application.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/application.rb b/application.rb index 8390d61..0a1b582 100644 --- a/application.rb +++ b/application.rb @@ -56,7 +56,6 @@ get '/:id/?' do # dataset.owl when /yaml/ response['Content-Type'] = 'application/x-yaml' - #OpenTox::Dataset.find(dataset.uri).to_yaml dataset.yaml else halt 400, "Unsupported MIME type '#{accept}'" @@ -69,7 +68,10 @@ end get '/:id/features/?' do YAML.load(Dataset.get(params[:id]).yaml).features.join("\n") + "\n" - #OpenTox::Dataset.find(url_for("/#{params[:id]}", :full)).features +end + +get '/:id/compounds/?' do + YAML.load(Dataset.get(params[:id]).yaml).compounds.join("\n") + "\n" end post '/?' do @@ -97,7 +99,6 @@ post '/?' do LOGGER.debug "Saving dataset #{dataset.uri}." begin dataset.save -# task.completed(dataset.uri) rescue => e LOGGER.error e.message LOGGER.info e.backtrace |