summaryrefslogtreecommitdiff
path: root/lib/swagger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/swagger.rb')
-rw-r--r--lib/swagger.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/swagger.rb b/lib/swagger.rb
index f6b42b2..9fa14f7 100644
--- a/lib/swagger.rb
+++ b/lib/swagger.rb
@@ -2,7 +2,7 @@ set :public_folder, File.join("/home/ist/swagger-ui/dist/")
# route to swagger API file
get "/" do
response['Content-Type'] = "text/html"
- index_file = File.join("/home/ist/swagger-ui/dist/index.html")
- bad_request_error "API Documentation in Swagger JSON is not implemented.", uri("/#{SERVICE}/api") unless File.exists?(index_file)
+ index_file = File.join(ENV['HOME'],"swagger-ui/dist/index.html")
+ bad_request_error "API Documentation in Swagger JSON is not implemented." unless File.exists?(index_file)
File.read(index_file)
end