Revert admin change.
This commit is contained in:
parent
ae8bc5d376
commit
0c2b9302b7
7 changed files with 9 additions and 22 deletions
|
|
@ -20,8 +20,10 @@ import logging
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
from flask import Flask
|
||||||
|
from flask_login import LoginManager
|
||||||
from werkzeug.serving import run_simple
|
from werkzeug.serving import run_simple
|
||||||
from quart import Quart
|
|
||||||
from routes import admin_bp
|
from routes import admin_bp
|
||||||
from common.log_utils import init_root_logger
|
from common.log_utils import init_root_logger
|
||||||
from common.constants import SERVICE_CONF
|
from common.constants import SERVICE_CONF
|
||||||
|
|
@ -30,7 +32,6 @@ from common import settings
|
||||||
from config import load_configurations, SERVICE_CONFIGS
|
from config import load_configurations, SERVICE_CONFIGS
|
||||||
from auth import init_default_admin, setup_auth
|
from auth import init_default_admin, setup_auth
|
||||||
from flask_session import Session
|
from flask_session import Session
|
||||||
from quart_auth import LoginManager
|
|
||||||
from common.versions import get_ragflow_version
|
from common.versions import get_ragflow_version
|
||||||
|
|
||||||
stop_event = threading.Event()
|
stop_event = threading.Event()
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,9 @@ import logging
|
||||||
import uuid
|
import uuid
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from quart import request, jsonify
|
|
||||||
from api.apps import current_user, login_user
|
from flask import jsonify, request
|
||||||
|
from flask_login import current_user, login_user
|
||||||
from itsdangerous.url_safe import URLSafeTimedSerializer as Serializer
|
from itsdangerous.url_safe import URLSafeTimedSerializer as Serializer
|
||||||
|
|
||||||
from api.common.exceptions import AdminException, UserNotFoundError
|
from api.common.exceptions import AdminException, UserNotFoundError
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
from flask import jsonify
|
||||||
|
|
||||||
from quart import jsonify
|
|
||||||
|
|
||||||
|
|
||||||
def success_response(data=None, message="Success", code=0):
|
def success_response(data=None, message="Success", code=0):
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
import secrets
|
import secrets
|
||||||
|
|
||||||
from quart import Blueprint, request
|
from flask import Blueprint, request
|
||||||
from api.apps import current_user, logout_user, login_required
|
from flask_login import current_user, login_required, logout_user
|
||||||
|
|
||||||
from auth import login_verify, login_admin, check_admin_auth
|
from auth import login_verify, login_admin, check_admin_auth
|
||||||
from responses import success_response, error_response
|
from responses import success_response, error_response
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ from api.utils.json_encode import CustomJSONEncoder
|
||||||
from api.utils import commands
|
from api.utils import commands
|
||||||
|
|
||||||
from flask_mail import Mail
|
from flask_mail import Mail
|
||||||
from quart_session import Session
|
|
||||||
from quart_auth import Unauthorized
|
from quart_auth import Unauthorized
|
||||||
from common import settings
|
from common import settings
|
||||||
from api.utils.api_utils import server_error_response
|
from api.utils.api_utils import server_error_response
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@ dependencies = [
|
||||||
"qianfan==0.4.6",
|
"qianfan==0.4.6",
|
||||||
"quart-auth==0.11.0",
|
"quart-auth==0.11.0",
|
||||||
"quart-cors==0.8.0",
|
"quart-cors==0.8.0",
|
||||||
"Quart-Session==3.0.0",
|
|
||||||
"Quart==0.20.0",
|
"Quart==0.20.0",
|
||||||
"ranx==0.3.20",
|
"ranx==0.3.20",
|
||||||
"readability-lxml==0.8.1",
|
"readability-lxml==0.8.1",
|
||||||
|
|
|
||||||
11
uv.lock
generated
11
uv.lock
generated
|
|
@ -5270,15 +5270,6 @@ wheels = [
|
||||||
{ url = "https://mirrors.aliyun.com/pypi/packages/ea/31/da390a5a10674481dea2909178973de81fa3a246c0eedcc0e1e4114f52f8/quart_cors-0.8.0-py3-none-any.whl", hash = "sha256:62dc811768e2e1704d2b99d5880e3eb26fc776832305a19ea53db66f63837767" },
|
{ url = "https://mirrors.aliyun.com/pypi/packages/ea/31/da390a5a10674481dea2909178973de81fa3a246c0eedcc0e1e4114f52f8/quart_cors-0.8.0-py3-none-any.whl", hash = "sha256:62dc811768e2e1704d2b99d5880e3eb26fc776832305a19ea53db66f63837767" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "quart-session"
|
|
||||||
version = "3.0.0"
|
|
||||||
source = { registry = "https://mirrors.aliyun.com/pypi/simple" }
|
|
||||||
dependencies = [
|
|
||||||
{ name = "quart" },
|
|
||||||
]
|
|
||||||
sdist = { url = "https://mirrors.aliyun.com/pypi/packages/1c/15/87047bb2139166cd8ee7f18148b7d7cf58f60b71d27e978fd47f7db6fd2b/Quart-Session-3.0.0.tar.gz", hash = "sha256:b9c466c705773f13141b210ac6b20381b667c6a518e7aa49bb134cdde80f3bb6" }
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ragflow"
|
name = "ragflow"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
|
|
@ -5389,7 +5380,6 @@ dependencies = [
|
||||||
{ name = "quart" },
|
{ name = "quart" },
|
||||||
{ name = "quart-auth" },
|
{ name = "quart-auth" },
|
||||||
{ name = "quart-cors" },
|
{ name = "quart-cors" },
|
||||||
{ name = "quart-session" },
|
|
||||||
{ name = "ranx" },
|
{ name = "ranx" },
|
||||||
{ name = "readability-lxml" },
|
{ name = "readability-lxml" },
|
||||||
{ name = "replicate" },
|
{ name = "replicate" },
|
||||||
|
|
@ -5548,7 +5538,6 @@ requires-dist = [
|
||||||
{ name = "quart", specifier = "==0.20.0" },
|
{ name = "quart", specifier = "==0.20.0" },
|
||||||
{ name = "quart-auth", specifier = "==0.11.0" },
|
{ name = "quart-auth", specifier = "==0.11.0" },
|
||||||
{ name = "quart-cors", specifier = "==0.8.0" },
|
{ name = "quart-cors", specifier = "==0.8.0" },
|
||||||
{ name = "quart-session", specifier = "==3.0.0" },
|
|
||||||
{ name = "ranx", specifier = "==0.3.20" },
|
{ name = "ranx", specifier = "==0.3.20" },
|
||||||
{ name = "readability-lxml", specifier = "==0.8.1" },
|
{ name = "readability-lxml", specifier = "==0.8.1" },
|
||||||
{ name = "replicate", specifier = "==0.31.0" },
|
{ name = "replicate", specifier = "==0.31.0" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue