package finki.it.phoneluxbackend.controllers; import finki.it.phoneluxbackend.services.PhoneOfferService; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @AllArgsConstructor @RequestMapping(path = "/specifications") public class SpecificationsController { private final PhoneOfferService phoneOfferService; // specifications endpoints @GetMapping(path = "/ram") public List getRamMemories() { return phoneOfferService.getRamMemories(); } @GetMapping(path = "/rom") public List getRomMemories() { return phoneOfferService.getRomMemories(); } @GetMapping(path = "/color") public List getColors() { return phoneOfferService.getColors(); } @GetMapping(path = "/chipset") public List getChipsets() { return phoneOfferService.getChipsets(); } @GetMapping(path = "/cpu") public List getCPUs() { return phoneOfferService.getCPUs(); } @GetMapping(path = "/frontcamera") public List getFrontCameras() { return phoneOfferService.getFrontCameras(); } @GetMapping(path = "/backcamera") public List getBackCameras() { return phoneOfferService.getBackCameras(); } @GetMapping(path = "/battery") public List getBatteries() { return phoneOfferService.getBatteries(); } @GetMapping(path = "/operatingsystem") public List getOperatingSystems() { return phoneOfferService.getOperatingSystems(); } }