Ignore:
Timestamp:
10/12/24 21:32:15 (5 weeks ago)
Author:
macagaso <gasoskamarija@…>
Branches:
master
Parents:
743de55
Message:

Updated version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/finki/it/terapijamkbackend/spring/services/CouponsService.java

    r743de55 r43c9090  
    99import java.util.List;
    1010import java.util.Optional;
     11import java.util.stream.Collectors;
    1112
    1213@Service
     
    3334        return couponRepository.findByTitle(identifier);
    3435    }
     36    public List<String> getCouponNames() {
     37        return couponRepository.findAll().stream()
     38                .map(Coupon::getCode)
     39                .collect(Collectors.toList());
     40    }
    3541
    3642    public void save(Coupon coupon) {
Note: See TracChangeset for help on using the changeset viewer.