public List<Terran> getTerran() { List<Terran> allTerranArmies = new ArrayList<>(); Iterable<Terran> values = repository.findAll(); for (Terran terran : values) allTerranArmies.add(terran); return allTerranArmies; }
public List<Terran> getSingleTerran(String email) { List<Terran> allTerranArmies = new ArrayList<>(); Iterable<Terran> values = repository.findAll(); for (Terran terran : values) { String user = terran.getUser(); if (user.equals(email)) { allTerranArmies.add(terran); } } return allTerranArmies; }