refactor: repository create mixin
This commit is contained in:
@ -16,7 +16,8 @@ class BoardService:
|
||||
)
|
||||
|
||||
async def create_board(self, request: CreateBoardRequest) -> CreateBoardResponse:
|
||||
board = await self.repository.create(request.entity)
|
||||
board_id = await self.repository.create(request.entity)
|
||||
board = await self.repository.get_by_id(board_id)
|
||||
return CreateBoardResponse(
|
||||
entity=BoardSchema.model_validate(board),
|
||||
message="Доска успешно создана",
|
||||
|
||||
Reference in New Issue
Block a user