nicehero commited on
Commit
ff57cda
·
1 Parent(s): 613ec30
Files changed (1) hide show
  1. main.py +9 -4
main.py CHANGED
@@ -5,6 +5,15 @@ import httpx
5
 
6
  app = FastAPI()
7
 
 
 
 
 
 
 
 
 
 
8
  @app.get("/getVPImage/{path:path}")
9
  async def get_vp_image(path: str):
10
  target_url = f"https://u7leyomozktm-5527.shanghai-01.dayunet.com/getVPImage/{path}"
@@ -37,10 +46,6 @@ async def log_error(request: Request):
37
 
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:
 
5
 
6
  app = FastAPI()
7
 
8
+ @app.get("/tg")
9
+ async def tg() -> Response:
10
+ with open("static/tg.html", "rb") as f:
11
+ return Response(content=f.read(), media_type="text/html")
12
+
13
+ @app.get("/test")
14
+ async def tg() -> Response:
15
+ return "test"
16
+
17
  @app.get("/getVPImage/{path:path}")
18
  async def get_vp_image(path: str):
19
  target_url = f"https://u7leyomozktm-5527.shanghai-01.dayunet.com/getVPImage/{path}"
 
46
 
47
  app.mount("/", StaticFiles(directory="static", html=True), name="static")
48
 
 
 
 
 
49
 
50
  @app.get("/")
51
  def index() -> FileResponse: