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
commit 1df71ec64d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 16 deletions

View file

@ -1,6 +1,6 @@
from flask import current_app
from flask_restful import Resource
from configs import dify_config
from controllers.service_api import api
@ -9,7 +9,7 @@ class IndexApi(Resource):
return {
"welcome": "Dify OpenAPI",
"api_version": "v1",
"server_version": current_app.config['CURRENT_VERSION']
"server_version": dify_config.CURRENT_VERSION,
}