feat: 新增dev模式下API文档登录不校验验证码,以适应开发调试

This commit is contained in:
insistence
2024-01-26 09:00:15 +08:00
parent 3fda4a284c
commit 84c97bdaff
2 changed files with 10 additions and 5 deletions

View File

@@ -162,8 +162,8 @@ class GetConfig:
parser.add_argument('--env', type=str, default='', help='运行环境')
# 解析命令行参数
args = parser.parse_args()
# 设置环境变量
os.environ['APP_ENV'] = args.env
# 设置环境变量如果未设置命令行参数默认APP_ENV为dev
os.environ['APP_ENV'] = args.env if args.env else 'dev'
# 读取运行环境
run_env = os.environ.get('APP_ENV', '')
# 运行环境未指定时默认加载.env.dev