feat(routes): add API setup support for route files
This commit is contained in:
parent
c968f3a594
commit
830311fe7e
@ -3,17 +3,11 @@ from .send_notification import router as sn_router
|
|||||||
from .online_platform_notification import router as ws_router
|
from .online_platform_notification import router as ws_router
|
||||||
from .template_massege import router as template_router
|
from .template_massege import router as template_router
|
||||||
from .email_sender import router as email_sender_router
|
from .email_sender import router as email_sender_router
|
||||||
|
from .tenant_notification import router as tenant_notification_router
|
||||||
|
|
||||||
api_router = APIRouter(prefix="/notification")
|
api_router = APIRouter(prefix="/notification")
|
||||||
api_router.include_router(sn_router, tags=["notification"])
|
api_router.include_router(sn_router, tags=["notification"])
|
||||||
api_router.include_router(template_router, prefix="/templates", tags=["templates"])
|
api_router.include_router(template_router, prefix="/templates", tags=["templates"])
|
||||||
api_router.include_router(email_sender_router, tags=["email_sender"])
|
api_router.include_router(email_sender_router, tags=["email_sender"])
|
||||||
|
api_router.include_router(tenant_notification_router, prefix="/tenant", tags=["tenant_notification"])
|
||||||
|
|
||||||
# WebSocket路由
|
|
||||||
websocket_router = APIRouter()
|
|
||||||
websocket_router.include_router(ws_router, prefix="/downstream", tags=["downstream"])
|
|
||||||
# 将WebSocket路由也注册到主路由中
|
|
||||||
api_router.include_router(websocket_router)
|
|
||||||
|
|
||||||
websocket_router = APIRouter()
|
|
||||||
websocket_router.include_router(ws_router, prefix="/downstream", tags=["downstream"])
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user