Fix user delete flow 12

This commit is contained in:
Urtzi Alfaro
2025-08-03 14:42:33 +02:00
parent b35eb7c875
commit b0d83720fd
7 changed files with 341 additions and 54 deletions

View File

@@ -87,7 +87,7 @@ class AuthTenantServiceClient(BaseServiceClient):
async def delete_user_memberships(self, user_id: str) -> Optional[Dict[str, Any]]:
"""Delete all tenant memberships for a user"""
try:
return await self.delete(f"users/{user_id}/memberships")
return await self.delete(f"/tenants/user/{user_id}/memberships")
except Exception as e:
logger.error("Failed to delete user memberships", user_id=user_id, error=str(e))
return None
@@ -281,7 +281,7 @@ class AuthNotificationServiceClient(BaseServiceClient):
async def delete_user_notification_data(self, user_id: str) -> Optional[Dict[str, Any]]:
"""Delete all notification data for a user"""
try:
return await self.delete(f"users/{user_id}/data")
return await self.delete(f"/users/{user_id}/notification-data")
except Exception as e:
logger.error("Failed to delete user notification data",
user_id=user_id,
@@ -296,7 +296,7 @@ class AuthNotificationServiceClient(BaseServiceClient):
async def cancel_pending_user_notifications(self, user_id: str) -> Optional[Dict[str, Any]]:
"""Cancel all pending notifications for a user"""
try:
return await self.post(f"users/{user_id}/notifications/cancel")
return await self.post(f"users/{user_id}/notifications/cancel-pending")
except Exception as e:
logger.error("Failed to cancel user notifications",
user_id=user_id,