nicehero
commited on
Commit
·
653ce63
1
Parent(s):
2526e18
main.py
Browse files
main.py
CHANGED
|
@@ -14,15 +14,14 @@ async def get_vp_image(path: str):
|
|
| 14 |
|
| 15 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 16 |
|
| 17 |
-
@app.
|
| 18 |
-
async def
|
| 19 |
-
target_url = f"https://u7leyomozktm-5527.shanghai-01.dayunet.com/
|
| 20 |
-
json_data = await request.json()
|
| 21 |
|
| 22 |
async with httpx.AsyncClient() as client:
|
| 23 |
-
response = await client.
|
| 24 |
|
| 25 |
-
return response.
|
| 26 |
|
| 27 |
@app.post("/log-error")
|
| 28 |
async def log_error(request: Request):
|
|
|
|
| 14 |
|
| 15 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 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}"
|
|
|
|
| 20 |
|
| 21 |
async with httpx.AsyncClient() as client:
|
| 22 |
+
response = await client.get(target_url)
|
| 23 |
|
| 24 |
+
return Response(content=response.content, media_type="image/jpeg", status_code=response.status_code)
|
| 25 |
|
| 26 |
@app.post("/log-error")
|
| 27 |
async def log_error(request: Request):
|