- Timestamp:
- 08/29/22 22:31:57 (2 years ago)
- Branches:
- master
- Children:
- dbd4834
- Parents:
- b68ae8d
- Location:
- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services
- Files:
-
- 5 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java
rb68ae8d rdfd5d87 21 21 } 22 22 23 public List<PhoneOffer> getOffersForPhone(Long phoneId) {24 boolean exists = phoneRepository.existsById(phoneId);25 if(!exists)26 throw new IllegalStateException("Phone with id "+phoneId+" does not exist");27 28 return phoneRepository.findById(phoneId).get().getPhoneOffers();29 }30 23 }
Note:
See TracChangeset
for help on using the changeset viewer.