diff options
author | mguetlein <martin.guetlein@gmail.com> | 2014-10-06 21:34:57 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2014-10-06 21:34:57 +0200 |
commit | d90e59ba2198586ba6f936c2fe8854adb915b9f2 (patch) | |
tree | 6096d5bb22708ce2fc9699f7fe607d45d635c175 | |
parent | 4c65e5352f391ed3833542f7f4f1b2e0a816d599 (diff) |
add head methods for each service
-rw-r--r-- | application.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/application.rb b/application.rb index fb14d01..f18ac9c 100644 --- a/application.rb +++ b/application.rb @@ -1,10 +1,14 @@ module OpenTox class Application < Service - head "/#{SERVICE}/:id/?" do - resource_not_found_error "#{uri} not found." unless FourStore.head(@uri.split('?').first) + head "/model/?" do end + head '/model/:id/?' do + halt 404 unless FourStore.head(@uri.split('?').first) + end + + post "/model/:id/?" do if ( (params[:compound_uri] and params[:dataset_uri]) or (!params[:compound_uri] and !params[:dataset_uri]) |