Changeset f25d07e for phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java
- Timestamp:
- 09/07/22 00:51:50 (2 years ago)
- Branches:
- master
- Children:
- 527b93f
- Parents:
- dbd4834
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java
rdbd4834 rf25d07e 1 1 package finki.it.phoneluxbackend.controllers; 2 2 3 import finki.it.phoneluxbackend.entities.Phone; 3 4 import finki.it.phoneluxbackend.entities.PhoneOffer; 4 5 import finki.it.phoneluxbackend.services.PhoneOfferService; 6 import finki.it.phoneluxbackend.services.PhoneService; 7 import lombok.AllArgsConstructor; 5 8 import org.springframework.beans.factory.annotation.Autowired; 6 9 import org.springframework.web.bind.annotation.GetMapping; … … 12 15 13 16 @RestController 14 @RequestMapping(path = "/phone/{phoneId}") 17 @AllArgsConstructor 18 @RequestMapping(path = "/phones/offers/{phoneId}") 15 19 public class PhoneOfferController { 16 20 private final PhoneOfferService phoneOfferService; 17 18 @Autowired 19 public PhoneOfferController(PhoneOfferService phoneOfferService) { 20 this.phoneOfferService = phoneOfferService; 21 } 21 private final PhoneService phoneService; 22 22 23 23 @GetMapping … … 25 25 return phoneOfferService.getPhoneOffersForPhone(phoneId); 26 26 } 27 27 28 }
Note:
See TracChangeset
for help on using the changeset viewer.