Fix tenant service

This commit is contained in:
Urtzi Alfaro
2025-07-21 20:48:41 +02:00
parent 153ae3f154
commit d029630c8e

View File

@@ -5,7 +5,7 @@ Tenant API endpoints
from fastapi import APIRouter, Depends, HTTPException, status, Request
from sqlalchemy.ext.asyncio import AsyncSession
from typing import List
from typing import List, Dict, Any
import structlog
from app.core.database import get_db
@@ -63,7 +63,6 @@ async def verify_tenant_access(
)
@router.get("/users/{user_id}/tenants", response_model=List[TenantResponse])
@require_authentication
async def get_user_tenants(
user_id: str,
current_user: Dict[str, Any] = Depends(get_current_user_dep),
@@ -89,7 +88,6 @@ async def get_user_tenants(
)
@router.get("/tenants/{tenant_id}", response_model=TenantResponse)
@require_authentication
async def get_tenant(
tenant_id: str,
current_user: Dict[str, Any] = Depends(get_current_user_dep),
@@ -114,7 +112,6 @@ async def get_tenant(
return tenant
@router.put("/tenants/{tenant_id}", response_model=TenantResponse)
@require_authentication
async def update_tenant(
tenant_id: str,
update_data: TenantUpdate,
@@ -136,7 +133,6 @@ async def update_tenant(
)
@router.post("/tenants/{tenant_id}/members", response_model=TenantMemberResponse)
@require_authentication
async def add_team_member(
tenant_id: str,
user_id: str,