class FavoritePlaceServiceImpl implements FavoritePlaceService {

    @Override
    @Transactional
    public Long deleteByUserEmailAndPlaceId(Long placeId, String userEmail) {
        log.info(LogMessage.IN_DELETE_BY_PLACE_ID_AND_USER_EMAIL, userEmail, placeId);
        FavoritePlace favoritePlace = repo.findByPlaceIdAndUserEmail(placeId, userEmail);
        if (favoritePlace == null) {
            throw new WrongIdException(ErrorMessage.FAVORITE_PLACE_NOT_FOUND);
        }
        repo.delete(favoritePlace);
        return favoritePlace.getId();
    }

}