feat: add workspace
This commit is contained in:
@@ -10,7 +10,9 @@ log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def delete_creative(self: 'Usecase', input: dto.DeleteCreativeInput) -> None:
|
||||
creative = await self.database.get_creative(input.user_id, input.creative_id)
|
||||
await self.ensure_workspace_access(input.workspace_id, input.user_id)
|
||||
|
||||
creative = await self.database.get_creative(input.workspace_id, input.creative_id)
|
||||
if not creative:
|
||||
log.warning('User %s attempted to delete unavailable creative %s', input.user_id, input.creative_id)
|
||||
raise domain.CreativeNotFound(input.creative_id)
|
||||
|
||||
Reference in New Issue
Block a user