diff --git a/app.py b/app.py index 4fe9860..96010d1 100644 --- a/app.py +++ b/app.py @@ -225,7 +225,7 @@ def library(project_id: Optional[int] = None): items = "".join( [ f"
" + f"Ansehen | Download .md" for d in docs ] ) @@ -260,13 +260,13 @@ def view_document(doc_id: int): body = f"""Projekt: {d['project']} · Typ: {d['kind']} · {d['created_at']}
- +{(d['content_md'] or '').replace('<','<')}
"""
return layout("Dokument", body)
-@app.get("/document/{doc_id}.md", response_class=PlainTextResponse)
+@app.get("/document/{doc_id}/download.md", response_class=PlainTextResponse)
def download_md(doc_id: int):
with db() as c:
d = c.execute("SELECT title,content_md FROM documents WHERE id=?", (doc_id,)).fetchone()