- 新增启停

- Close #250
- 修复字幕重命名产生的bug
This commit is contained in:
EstrellaXD
2023-05-10 22:57:05 +08:00
parent b9968c796d
commit 88d64f3e1a
5 changed files with 24 additions and 7 deletions

View File

@@ -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)