Changeset e5b84dc for phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java
- Timestamp:
- 09/11/22 18:03:58 (2 years ago)
- Branches:
- master
- Children:
- 775e15e
- Parents:
- 527b93f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java
r527b93f re5b84dc 30 30 } 31 31 32 public PhoneOffer getPhoneOffer(Long offerId){ 33 boolean exists = phoneOfferRepository.existsById(offerId); 34 35 if(!exists) 36 throw new IllegalStateException("Phone offer with id "+offerId+" does not exist"); 37 38 return phoneOfferRepository.findById(offerId).get(); 39 } 40 41 32 42 public List<String> getShops() { 33 43 return phoneOfferRepository.findAll().stream()
Note:
See TracChangeset
for help on using the changeset viewer.