4142434445464748
/** * Stores favorite. */ public Favorites storeFavorite(Question question, User user) { Favorites favorites = new Favorites(question.getId(), user.getId()); return appDao.store(favorites); }
4950515253545556575859
/** * Deletes favorite. */ public void removeFavorite(Question question, User user) { Favorites favorites = findUserFavorite(question, user); if (favorites == null) { return; } appDao.deleteById(favorites); }