Start integrating the onboarding flow with backend 3
This commit is contained in:
@@ -19,7 +19,6 @@ from app.services.notification_service import EnhancedNotificationService
|
||||
from app.models.notifications import NotificationType as ModelNotificationType
|
||||
from shared.auth.decorators import (
|
||||
get_current_user_dep,
|
||||
get_current_tenant_id_dep,
|
||||
require_role
|
||||
)
|
||||
from shared.database.base import create_database_manager
|
||||
@@ -37,7 +36,6 @@ def get_enhanced_notification_service():
|
||||
@track_endpoint_metrics("notification_send")
|
||||
async def send_notification_enhanced(
|
||||
notification_data: Dict[str, Any],
|
||||
tenant_id: str = Depends(get_current_tenant_id_dep),
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_dep),
|
||||
notification_service: EnhancedNotificationService = Depends(get_enhanced_notification_service)
|
||||
):
|
||||
@@ -86,7 +84,7 @@ async def send_notification_enhanced(
|
||||
|
||||
# Create notification using enhanced service
|
||||
notification = await notification_service.create_notification(
|
||||
tenant_id=tenant_id,
|
||||
tenant_id=current_user.get("tenant_id"),
|
||||
sender_id=current_user["user_id"],
|
||||
notification_type=notification_type,
|
||||
message=notification_data["message"],
|
||||
@@ -104,7 +102,7 @@ async def send_notification_enhanced(
|
||||
|
||||
logger.info("Notification sent successfully",
|
||||
notification_id=notification.id,
|
||||
tenant_id=tenant_id,
|
||||
tenant_id=current_user.get("tenant_id"),
|
||||
type=notification_type.value,
|
||||
priority=priority.value)
|
||||
|
||||
@@ -114,7 +112,7 @@ async def send_notification_enhanced(
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error("Failed to send notification",
|
||||
tenant_id=tenant_id,
|
||||
tenant_id=current_user.get("tenant_id"),
|
||||
sender_id=current_user["user_id"],
|
||||
error=str(e))
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user