Improve the frontend modals
This commit is contained in:
@@ -35,7 +35,7 @@ class AuthServiceClient(BaseServiceClient):
|
||||
"""
|
||||
try:
|
||||
# Use the service endpoint that accepts user_id as parameter
|
||||
result = await self.get(f"/{user_id}/onboarding/progress")
|
||||
result = await self.get(f"/users/{user_id}/onboarding/progress")
|
||||
|
||||
if result:
|
||||
logger.info("Retrieved user onboarding progress",
|
||||
|
||||
@@ -44,6 +44,7 @@ class RouteBuilder:
|
||||
|
||||
Args:
|
||||
resource: Resource name (e.g., 'ingredients', 'batches')
|
||||
Empty string returns just the service path
|
||||
include_tenant_prefix: Whether to include /tenants/{tenant_id} prefix
|
||||
|
||||
Returns:
|
||||
@@ -53,10 +54,20 @@ class RouteBuilder:
|
||||
builder = RouteBuilder('inventory')
|
||||
builder.build_base_route('ingredients')
|
||||
# Returns: '/api/v1/tenants/{tenant_id}/inventory/ingredients'
|
||||
|
||||
builder.build_base_route('')
|
||||
# Returns: '/api/v1/tenants/{tenant_id}/inventory'
|
||||
"""
|
||||
if include_tenant_prefix:
|
||||
return f"{self.BASE_PATH}/tenants/{{tenant_id}}/{self.service_name}/{resource}"
|
||||
return f"{self.BASE_PATH}/{self.service_name}/{resource}"
|
||||
if resource:
|
||||
# Resource provided - add it to the path
|
||||
if include_tenant_prefix:
|
||||
return f"{self.BASE_PATH}/tenants/{{tenant_id}}/{self.service_name}/{resource}"
|
||||
return f"{self.BASE_PATH}/{self.service_name}/{resource}"
|
||||
else:
|
||||
# Empty resource - return just the service path
|
||||
if include_tenant_prefix:
|
||||
return f"{self.BASE_PATH}/tenants/{{tenant_id}}/{self.service_name}"
|
||||
return f"{self.BASE_PATH}/{self.service_name}"
|
||||
|
||||
def build_dashboard_route(self, operation: str, include_tenant_prefix: bool = True) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user