feat: переименование доменной области

This commit is contained in:
Artem Tsyrulnikov
2025-12-14 12:21:35 +03:00
parent 3cb3da4dbe
commit f3e09a08eb
75 changed files with 1624 additions and 1417 deletions

View File

@@ -21,10 +21,28 @@ def LoginTokenAlreadyUsed() -> HTTPException:
return HTTPException(status.HTTP_400_BAD_REQUEST, 'Login token has already been used')
def TargetChannelNotFound(channel_id: uuid.UUID | None = None) -> HTTPException:
def ChannelNotFound(channel_id: uuid.UUID | None = None) -> HTTPException:
if channel_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Target channel not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Target channel {channel_id} not found')
return HTTPException(status.HTTP_404_NOT_FOUND, 'Channel not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Channel {channel_id} not found')
def ProjectNotFound(project_id: uuid.UUID | None = None) -> HTTPException:
if project_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Project not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Project {project_id} not found')
def PurchasePlanNotFound(plan_id: uuid.UUID | None = None) -> HTTPException:
if plan_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Purchase plan not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Purchase plan {plan_id} not found')
def PurchasePlanChannelNotFound(plan_channel_id: uuid.UUID | None = None) -> HTTPException:
if plan_channel_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Purchase plan channel not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Purchase plan channel {plan_channel_id} not found')
def ChannelAlreadyExists(telegram_id: int) -> HTTPException:
@@ -37,16 +55,6 @@ def ChannelNoAdminRights() -> HTTPException:
)
def ExternalChannelNotFound(channel_id: uuid.UUID | None = None) -> HTTPException:
if channel_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'External channel not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'External channel {channel_id} not found')
def ExternalChannelAlreadyExists(telegram_id: int) -> HTTPException:
return HTTPException(status.HTTP_409_CONFLICT, f'External channel {telegram_id} already exists')
def CreativeNotFound(creative_id: uuid.UUID | None = None) -> HTTPException:
if creative_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Creative not found')