/**
  * Returns threads by board
  * @param $boardId
  * @param SeekableInterface $seek
  * @return Ok
  */
 public function getByBoardId($boardId, SeekableInterface $seek)
 {
     $board = $this->boardRepository->getBoardById($boardId);
     $threadsQuery = new ThreadListQuery($board, $seek);
     $threadsQuery->withAllPosts();
     $threadsQueryList = $this->threadRepository->getThreads($threadsQuery);
     $jsonResponse = ['items' => [], 'total' => $threadsQueryList->getTotal()];
     foreach ($threadsQueryList->getItems() as $thread) {
         $jsonResponse['items'][] = $this->convertThreadToJSON($thread);
     }
     return new Ok($jsonResponse);
 }