Fix backend URLs...

This commit is contained in:
Piotr Dobrowolski 2017-05-28 22:25:38 +02:00
parent e6c4ebee5d
commit f3e0f3ff9e
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,7 @@ module Excon
end end
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/" CODE_PREFIX = "HTTP://I/"
def api(uri) def api(uri)
@ -87,6 +87,8 @@ def render_label(label)
pdf.render pdf.render
end end
set :bind, '0.0.0.0'
get '/api/1/preview/:label.pdf' do get '/api/1/preview/:label.pdf' do
headers["Content-Type"] = "application/pdf; charset=utf8" headers["Content-Type"] = "application/pdf; charset=utf8"
render_label params["label"] render_label params["label"]