summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-09-14 16:10:13 +0200
committermr <mr@mrautenberg.de>2011-09-14 16:10:13 +0200
commita8b6b8debe373b3c936d6cbf863c38ff2862441b (patch)
tree5e825796571d1937588970c30b23eeffd0a34316
parent05d133d09aba7c1853ae597c7c95cf6dc8e9912f (diff)
have json representation for HTML output
-rw-r--r--lazar.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lazar.rb b/lazar.rb
index 481a59d..3af6c1c 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -37,7 +37,8 @@ get '/:id/?' do
send_file @json_file, :type => 'application/json'
when /html/
response['Content-Type'] = 'text/html'
- OpenTox.text_to_html File.read(yaml_file(params[:id]))
+ #OpenTox.text_to_html File.read(yaml_file(params[:id]))
+ OpenTox.text_to_html JSON.pretty_generate(JSON.parse(File.read(@json_file)))
else
raise OpenTox::BadRequestError.new "Unsupported MIME type '#{@accept}'"
end