summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2018-06-12 16:23:10 +0200
committergebele <gebele@in-silico.ch>2018-06-12 16:23:10 +0200
commitba65db7e62264b94a7303681e30db4ac415b4822 (patch)
tree56d50c057ef0a5c63de72e60b9d5caf8455c1b69
parentf6f186de7144bfbddc508e1330f334d3ee7f2005 (diff)
fixed api content types
-rw-r--r--application.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/application.rb b/application.rb
index 8d0429f..96e564b 100644
--- a/application.rb
+++ b/application.rb
@@ -14,7 +14,24 @@ configure :development do
end
before do
- @version = File.read("VERSION").chomp
+ paths = [
+ "/aa",
+ "/api",
+ "/compound",
+ "/dataset",
+ "/feature",
+ "/model",
+ "/nanoparticle",
+ "/report",
+ "/substance",
+ "/swagger",
+ "/validation"]
+ if paths.include?(request.path)
+ @accept = request.env['HTTP_ACCEPT']
+ response['Content-Type'] = @accept
+ else
+ @version = File.read("VERSION").chomp
+ end
end
not_found do