summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-05-10 17:19:26 +0200
committergebele <gebele@in-silico.ch>2013-05-10 17:19:26 +0200
commit250720086733cbc0d31a2d7b9e585a074dda816a (patch)
tree72f073a27dcdeceb143044b163b25cb5b6e6e626
parentade0195b8790c481c6dcd12db6f755e8b2955f5d (diff)
added HEAD route for accessible requests
-rw-r--r--lib/opentox.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb
index 8e20ab2..f1ae2d1 100644
--- a/lib/opentox.rb
+++ b/lib/opentox.rb
@@ -109,7 +109,12 @@ module OpenTox
# HEAD route for service check
# algorithm, compound and validation overwrite this
head "/#{SERVICE}/?" do
- #$logger.debug "#{SERVICE.capitalize} service is running."
+ end
+
+ # HEAD request for object in backend
+ # algorithm, dataset, compound and validation overwrite this
+ head "/#{SERVICE}/:id/?" do
+ resource_not_found_error "#{uri} not found." unless FourStore.head(@uri)
end
# Get a list of objects at the server or perform a SPARQL query