source: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/SpecificationsController.java@ 5201690

Last change on this file since 5201690 was 5201690, checked in by Marko <Marko@…>, 22 months ago

Admin and specifications controllers added

  • Property mode set to 100644
File size: 1.8 KB
Line 
1package finki.it.phoneluxbackend.controllers;
2
3import finki.it.phoneluxbackend.services.PhoneOfferService;
4import lombok.AllArgsConstructor;
5import org.springframework.web.bind.annotation.GetMapping;
6import org.springframework.web.bind.annotation.RequestMapping;
7import org.springframework.web.bind.annotation.RestController;
8
9import java.util.List;
10
11@RestController
12@AllArgsConstructor
13@RequestMapping(path = "/specifications")
14public 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}
Note: See TracBrowser for help on using the repository browser.