feat: add workspace
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user