summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-05-28 22:25:38 +0200
committerPiotr Dobrowolski <admin@tastycode.pl>2017-05-28 22:25:38 +0200
commitf3e0f3ff9e37526f8ffaefa6efeaa05ba7ba06d5 (patch)
tree5836b3f7dc453aaf881b409ed68e5a2297fc37eb
parente6c4ebee5d250eb3f4267127be18d9f348a8edf3 (diff)
downloadspejstore-labelmaker-f3e0f3ff9e37526f8ffaefa6efeaa05ba7ba06d5.tar.gz
spejstore-labelmaker-f3e0f3ff9e37526f8ffaefa6efeaa05ba7ba06d5.tar.bz2
spejstore-labelmaker-f3e0f3ff9e37526f8ffaefa6efeaa05ba7ba06d5.zip
Fix backend URLs...
-rw-r--r--main.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.rb b/main.rb
index c69a89f..837d332 100644
--- a/main.rb
+++ b/main.rb
@@ -21,7 +21,7 @@ module Excon
end
end
-BACKEND_URL = 'http://127.0.0.1:8000/api/1/'
+BACKEND_URL = 'http://inventory.waw.hackerspace.pl/api/1/'
CODE_PREFIX = "HTTP://I/"
def api(uri)
@@ -87,6 +87,8 @@ def render_label(label)
pdf.render
end
+set :bind, '0.0.0.0'
+
get '/api/1/preview/:label.pdf' do
headers["Content-Type"] = "application/pdf; charset=utf8"
render_label params["label"]