rearrange for parts

This commit is contained in:
CHIEFSOFT\ameye
2025-10-17 19:22:29 -04:00
parent b7e3527f35
commit 550895b8ef
+14 -11
View File
@@ -22,19 +22,17 @@ def create_app():
# import oracledb
# oracledb.init_oracle_client(lib_dir=None)
app = Flask(__name__)
# Load configuration
app.config.from_object(Config)
CORS(app)
JWTManager(app)
CORS(app, supports_credentials=True)
try:
app = Flask(__name__)
# Load configuration
app.config.from_object(Config)
CORS(app)
JWTManager(app)
CORS(app, supports_credentials=True)
# Swagger Doc
SWAGGER_URL = app.config.get("SWAGGER_URL")
API_URL = app.config.get("API_URL")
@@ -45,6 +43,11 @@ def create_app():
swagger_ui_blueprint = get_swaggerui_blueprint(SWAGGER_URL, API_URL)
app.register_blueprint(swagger_ui_blueprint, url_prefix=SWAGGER_URL)
except Exception as e:
print(f"Swagger Unexpected error occurred: {e}")
try:
# Error Handlers
register_error_handlers(app)