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