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

4
.gitignore vendored
View File

@@ -164,8 +164,6 @@ cython_debug/
# Custom
/src/test.py
/src/module/parser/analyser/tmdb_parser.py
/src/module/run_debug.sh
/src/module/debug_run.sh
/src/module/__version__.py
@@ -175,7 +173,7 @@ cython_debug/
test.*
.run
/dev.sh
/src/templates/
/src/config/
/src/debuger.py

24
dev.sh
View File

@@ -1,24 +0,0 @@
#!/bin/bash
# This script is used to run the development environment.
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple install -r requirements.txt
cd src || exit
CONFIG_DIR="config"
if [ ! -d "$CONFIG_DIR" ]; then
echo "The directory '$CONFIG_DIR' is missing."
mkdir config
fi
VERSION_FILE="module/__version__.py"
if [ ! -f "$VERSION_FILE" ]; then
echo "The file '$VERSION_FILE' is missing."
echo "VERSION='DEV_VERSION'" >> "$VERSION_FILE"
fi
python3 main.py

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)