mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-15 02:50:42 +08:00
@@ -14,7 +14,8 @@ router = FastAPI()
|
||||
@router.get("/api/v1/log", tags=["log"])
|
||||
async def get_log():
|
||||
if os.path.isfile(LOG_PATH):
|
||||
return FileResponse(LOG_PATH)
|
||||
with open(LOG_PATH, "r") as f:
|
||||
return Response(f.read(), media_type="text/plain")
|
||||
else:
|
||||
return Response("Log file not found", status_code=404)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user