refactor: repository create mixin

This commit is contained in:
2025-09-05 00:04:09 +04:00
parent c632fb8037
commit e5be35be35
9 changed files with 54 additions and 43 deletions

View File

@ -17,7 +17,8 @@ class StatusService:
)
async def create_status(self, request: CreateStatusRequest) -> CreateStatusResponse:
status = await self.repository.create(request.entity)
status_id = await self.repository.create(request.entity)
status = await self.repository.get_by_id(status_id)
return CreateStatusResponse(
entity=StatusSchema.model_validate(status),
message="Статус успешно создан",