source: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java@ dbd4834

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
Line 
1package finki.it.phoneluxbackend.controllers;
2
3import finki.it.phoneluxbackend.entities.Phone;
4import finki.it.phoneluxbackend.entities.PhoneOffer;
5import finki.it.phoneluxbackend.services.PhoneService;
6import org.springframework.beans.factory.annotation.Autowired;
7import org.springframework.web.bind.annotation.*;
8
9import java.util.List;
10
11@RestController
12@RequestMapping(path = "/")
13public class PhoneController {
14 private final PhoneService phoneService;
15
16 @Autowired
17 public PhoneController(PhoneService phoneService) {
18 this.phoneService = phoneService;
19 }
20
21
22 // handle request parameters for filtering phones
23 @GetMapping
24 public List<Phone> getPhones(){
25 return phoneService.getPhones();
26 }
27
28}
Note: See TracBrowser for help on using the repository browser.