From 95e1c1888afb0844c4e7bd8b01ac1a9c4945170c Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Fri, 2 Jun 2023 12:57:33 +0800 Subject: [PATCH] fix: quick fix gitignore problem --- .gitignore | 4 +--- dev.sh | 24 ------------------------ docs/wiki | 2 +- src/module/api/log.py | 2 +- 4 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 dev.sh diff --git a/.gitignore b/.gitignore index b161e24b..e2a43594 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/dev.sh b/dev.sh deleted file mode 100644 index 323fc3c2..00000000 --- a/dev.sh +++ /dev/null @@ -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 \ No newline at end of file diff --git a/docs/wiki b/docs/wiki index 4311a8de..519e381e 160000 --- a/docs/wiki +++ b/docs/wiki @@ -1 +1 @@ -Subproject commit 4311a8def4ffe78d1eb8a5d326482df1a1170f74 +Subproject commit 519e381e8a1add62e76a39181ee61bad02816035 diff --git a/src/module/api/log.py b/src/module/api/log.py index 24c04432..8e7e65d7 100644 --- a/src/module/api/log.py +++ b/src/module/api/log.py @@ -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)