refactor(api): switch to dify_config with Pydantic in controllers and schedule (#6237)

This commit is contained in:
天魂
2024-07-12 16:51:43 +08:00
committed by GitHub
parent a9ee52f2d7
commit 1df71ec64d
7 changed files with 17 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
from flask import current_app
from flask_restful import fields, marshal_with
from configs import dify_config
from controllers.web import api
from controllers.web.error import AppUnavailableError
from controllers.web.wraps import WebApiResource
@@ -75,7 +75,7 @@ class AppParameterApi(WebApiResource):
"transfer_methods": ["remote_url", "local_file"]
}}),
'system_parameters': {
'image_file_size_limit': current_app.config.get('UPLOAD_IMAGE_FILE_SIZE_LIMIT')
'image_file_size_limit': dify_config.UPLOAD_IMAGE_FILE_SIZE_LIMIT
}
}