refactor: repository create mixin
This commit is contained in:
@ -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="Статус успешно создан",
|
||||
|
||||
Reference in New Issue
Block a user