19 lines
463 B
Python
19 lines
463 B
Python
from flask import Flask
|
|
from app.api.v1.controllers import api_v1
|
|
from app.api.v1.zhipu_controller import zhipu_controller
|
|
from app.config import Config
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
app.config.from_object(Config)
|
|
|
|
# Register Blueprints
|
|
app.register_blueprint(api_v1, url_prefix='/api/v1')
|
|
|
|
|
|
|
|
# Register Zhipu-related routes under /api/v1/zhipu
|
|
app.register_blueprint(zhipu_controller, url_prefix='/api/v1')
|
|
|
|
return app
|