Last change
on this file since dfd5d87 was dfd5d87, checked in by Marko <Marko@…>, 23 months ago |
Registration logic with confirmation token implemented
|
-
Property mode
set to
100644
|
File size:
966 bytes
|
Rev | Line | |
---|
[dfd5d87] | 1 | package finki.it.phoneluxbackend.controllers;
|
---|
| 2 |
|
---|
| 3 | import finki.it.phoneluxbackend.entities.PhoneOffer;
|
---|
| 4 | import finki.it.phoneluxbackend.services.PhoneOfferService;
|
---|
| 5 | import org.springframework.beans.factory.annotation.Autowired;
|
---|
| 6 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
| 7 | import org.springframework.web.bind.annotation.PathVariable;
|
---|
| 8 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
| 9 | import org.springframework.web.bind.annotation.RestController;
|
---|
| 10 |
|
---|
| 11 | import java.util.List;
|
---|
| 12 |
|
---|
| 13 | @RestController
|
---|
| 14 | @RequestMapping(path = "/phone/{phoneId}")
|
---|
| 15 | public class PhoneOfferController {
|
---|
| 16 | private final PhoneOfferService phoneOfferService;
|
---|
| 17 |
|
---|
| 18 | @Autowired
|
---|
| 19 | public PhoneOfferController(PhoneOfferService phoneOfferService) {
|
---|
| 20 | this.phoneOfferService = phoneOfferService;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | @GetMapping
|
---|
| 24 | public List<PhoneOffer> getOffersForPhone(@PathVariable("phoneId") Long phoneId){
|
---|
| 25 | return phoneOfferService.getPhoneOffersForPhone(phoneId);
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.