fix: quick fix gitignore problem

This commit is contained in:
EstrellaXD
2023-06-02 12:57:33 +08:00
parent b5c3be1c1b
commit 95e1c1888a
4 changed files with 3 additions and 29 deletions

View File

@@ -14,7 +14,7 @@ async def get_log(current_user=Depends(get_current_user)):
status_code=status.HTTP_401_UNAUTHORIZED, detail="invalid token"
)
if os.path.isfile(LOG_PATH):
with open(LOG_PATH, "r") as f:
with open(LOG_PATH, "rb") as f:
return Response(f.read(), media_type="text/plain")
else:
return Response("Log file not found", status_code=404)