1 | package finki.it.phoneluxbackend.controllers;
|
---|
2 |
|
---|
3 | import finki.it.phoneluxbackend.services.PhoneOfferService;
|
---|
4 | import lombok.AllArgsConstructor;
|
---|
5 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
6 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
7 | import org.springframework.web.bind.annotation.RestController;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @RestController
|
---|
12 | @AllArgsConstructor
|
---|
13 | @RequestMapping(path = "/specifications")
|
---|
14 | public class SpecificationsController {
|
---|
15 | private final PhoneOfferService phoneOfferService;
|
---|
16 |
|
---|
17 | // specifications endpoints
|
---|
18 | @GetMapping(path = "/ram")
|
---|
19 | public List<String> getRamMemories()
|
---|
20 | {
|
---|
21 | return phoneOfferService.getRamMemories();
|
---|
22 | }
|
---|
23 |
|
---|
24 | @GetMapping(path = "/rom")
|
---|
25 | public List<String> getRomMemories()
|
---|
26 | {
|
---|
27 | return phoneOfferService.getRomMemories();
|
---|
28 | }
|
---|
29 |
|
---|
30 | @GetMapping(path = "/color")
|
---|
31 | public List<String> getColors()
|
---|
32 | {
|
---|
33 | return phoneOfferService.getColors();
|
---|
34 | }
|
---|
35 |
|
---|
36 | @GetMapping(path = "/chipset")
|
---|
37 | public List<String> getChipsets()
|
---|
38 | {
|
---|
39 | return phoneOfferService.getChipsets();
|
---|
40 | }
|
---|
41 |
|
---|
42 | @GetMapping(path = "/cpu")
|
---|
43 | public List<String> getCPUs()
|
---|
44 | {
|
---|
45 | return phoneOfferService.getCPUs();
|
---|
46 | }
|
---|
47 |
|
---|
48 | @GetMapping(path = "/frontcamera")
|
---|
49 | public List<String> getFrontCameras()
|
---|
50 | {
|
---|
51 | return phoneOfferService.getFrontCameras();
|
---|
52 | }
|
---|
53 |
|
---|
54 | @GetMapping(path = "/backcamera")
|
---|
55 | public List<String> getBackCameras()
|
---|
56 | {
|
---|
57 | return phoneOfferService.getBackCameras();
|
---|
58 | }
|
---|
59 |
|
---|
60 | @GetMapping(path = "/battery")
|
---|
61 | public List<String> getBatteries()
|
---|
62 | {
|
---|
63 | return phoneOfferService.getBatteries();
|
---|
64 | }
|
---|
65 |
|
---|
66 | @GetMapping(path = "/operatingsystem")
|
---|
67 | public List<String> getOperatingSystems()
|
---|
68 | {
|
---|
69 | return phoneOfferService.getOperatingSystems();
|
---|
70 | }
|
---|
71 |
|
---|
72 | }
|
---|