This commit is contained in:
joachimschmidt557 2019-07-25 17:39:41 +02:00
parent 9d362344c9
commit e0f58caa71

View file

@ -5,7 +5,7 @@ import jester
proc getContent(pad:string, etherpadUrl:string):string =
var client = newHTTPClient()
result = client.getContent(etherpadUrl & "pad/p/" & pad & "/export/txt")
result = client.getContent(etherpadUrl & "p/" & pad & "/export/txt")
when isMainModule:
@ -26,7 +26,7 @@ when isMainModule:
let (output, exitCode) = execCmdEx(quoteShellCommand(["pdflatex", "-halt-on-error", "etherpad.tex"]))
if exitCode == 0:
sendFile("etherpad.pdf")
resp(Http200, readFile("etherpad.pdf"), contentType = "application/pdf")
else:
resp output