nicehero commited on
Commit
613ec30
·
1 Parent(s): 6e4ee5d
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -38,8 +38,9 @@ async def log_error(request: Request):
38
  app.mount("/", StaticFiles(directory="static", html=True), name="static")
39
 
40
  @app.get("/tg")
41
- def tg() -> FileResponse:
42
- return FileResponse(path="/app/static/tg.html", media_type="text/html")
 
43
 
44
  @app.get("/")
45
  def index() -> FileResponse:
 
38
  app.mount("/", StaticFiles(directory="static", html=True), name="static")
39
 
40
  @app.get("/tg")
41
+ def tg() -> Response:
42
+ with open("static/tg.html", "rb") as f:
43
+ return Response(content=f.read(), media_type="text/html")
44
 
45
  @app.get("/")
46
  def index() -> FileResponse: