feat: add workspace

This commit is contained in:
Artem Tsyrulnikov
2025-12-13 22:09:55 +03:00
parent 2fdd56c3e0
commit af32e2a507
55 changed files with 677 additions and 227 deletions

View File

@@ -11,9 +11,15 @@ log = logging.getLogger(__name__)
async def update_external_channel(
self: 'Usecase', channel_id: uuid.UUID, input: dto.UpdateExternalChannelInput, user_id: uuid.UUID
self: 'Usecase',
channel_id: uuid.UUID,
input: dto.UpdateExternalChannelInput,
user_id: uuid.UUID,
workspace_id: uuid.UUID,
) -> dto.ExternalChannelOutput:
external_channel = await self.database.get_external_channel(user_id, channel_id=channel_id)
await self.ensure_workspace_access(workspace_id, user_id)
external_channel = await self.database.get_external_channel(workspace_id, channel_id=channel_id)
if not external_channel:
log.warning('External channel %s not found', channel_id)
raise domain.ExternalChannelNotFound(channel_id)