mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
refactor: 将配置导入导出常量移至文件顶部
This commit is contained in:
@@ -23,6 +23,10 @@ from src.services.system.config import SystemConfigService
|
||||
|
||||
router = APIRouter(prefix="/api/admin/system", tags=["Admin - System"])
|
||||
|
||||
CONFIG_EXPORT_VERSION = "2.2"
|
||||
CONFIG_SUPPORTED_VERSIONS = ("2.0", "2.1", "2.2")
|
||||
MAX_IMPORT_SIZE = 10 * 1024 * 1024 # 10MB
|
||||
|
||||
|
||||
def _get_version_from_git() -> str | None:
|
||||
"""从 git describe 获取版本号"""
|
||||
@@ -1077,11 +1081,6 @@ class AdminExportConfigAdapter(AdminApiAdapter):
|
||||
}
|
||||
|
||||
|
||||
CONFIG_EXPORT_VERSION = "2.2"
|
||||
CONFIG_SUPPORTED_VERSIONS = ("2.0", "2.1", "2.2")
|
||||
MAX_IMPORT_SIZE = 10 * 1024 * 1024 # 10MB
|
||||
|
||||
|
||||
class AdminImportConfigAdapter(AdminApiAdapter):
|
||||
"""导入提供商和模型配置"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user