2026.03.30 front és garázs logika
This commit is contained in:
@@ -106,7 +106,7 @@ async def onboard_organization(
|
||||
|
||||
return {"organization_id": new_org.id, "status": new_org.status}
|
||||
|
||||
@router.get("/my", response_model=List[CorpOnboardResponse])
|
||||
@router.get("/my", response_model=List[dict])
|
||||
async def get_my_organizations(
|
||||
db: AsyncSession = Depends(get_db),
|
||||
current_user: User = Depends(get_current_user)
|
||||
@@ -120,4 +120,19 @@ async def get_my_organizations(
|
||||
result = await db.execute(stmt)
|
||||
orgs = result.scalars().all()
|
||||
|
||||
return [{"organization_id": o.id, "status": o.status} for o in orgs]
|
||||
# Return full organization details
|
||||
return [
|
||||
{
|
||||
"organization_id": o.id,
|
||||
"status": o.status,
|
||||
"name": o.name,
|
||||
"full_name": o.full_name,
|
||||
"display_name": o.display_name,
|
||||
"tax_number": o.tax_number,
|
||||
"country_code": o.country_code,
|
||||
"is_active": o.is_active,
|
||||
"is_deleted": o.is_deleted,
|
||||
"subscription_plan": o.subscription_plan
|
||||
}
|
||||
for o in orgs
|
||||
]
|
||||
Reference in New Issue
Block a user