Improve the frontend and repository layer
This commit is contained in:
@@ -7,7 +7,7 @@ from fastapi import FastAPI
|
||||
from sqlalchemy import text
|
||||
from app.core.config import settings
|
||||
from app.core.database import database_manager
|
||||
from app.api import tenants, tenant_members, tenant_operations, webhooks, internal_demo, plans, subscription
|
||||
from app.api import tenants, tenant_members, tenant_operations, webhooks, internal_demo, plans, subscription, tenant_settings
|
||||
from shared.service_base import StandardFastAPIService
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ class TenantService(StandardFastAPIService):
|
||||
"""Custom startup logic for tenant service"""
|
||||
# Import models to ensure they're registered with SQLAlchemy
|
||||
from app.models.tenants import Tenant, TenantMember, Subscription
|
||||
from app.models.tenant_settings import TenantSettings
|
||||
self.logger.info("Tenant models imported successfully")
|
||||
|
||||
async def on_shutdown(self, app: FastAPI):
|
||||
@@ -113,6 +114,8 @@ service.setup_custom_endpoints()
|
||||
# Include routers
|
||||
service.add_router(plans.router, tags=["subscription-plans"]) # Public endpoint
|
||||
service.add_router(subscription.router, tags=["subscription"])
|
||||
# Register settings router BEFORE tenants router to ensure proper route matching
|
||||
service.add_router(tenant_settings.router, prefix="/api/v1/tenants", tags=["tenant-settings"])
|
||||
service.add_router(tenants.router, tags=["tenants"])
|
||||
service.add_router(tenant_members.router, tags=["tenant-members"])
|
||||
service.add_router(tenant_operations.router, tags=["tenant-operations"])
|
||||
|
||||
Reference in New Issue
Block a user