public List<Topic> getAllTopicsForCategory(Long categoryId) { return topicRepository.getAllTopicsForCategory(categoryId); }
public void save(Topic topic, Long categoryId) { Category category = categoryService.getById(categoryId); topic.setCategory(category); topicRepository.save(topic); }