|
@@ -7,8 +7,6 @@ import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("api/portfolios")
|
|
@RequestMapping("api/portfolios")
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@@ -17,12 +15,6 @@ public class PortfolioController {
|
|
|
|
|
|
|
|
private final PortfolioService service;
|
|
private final PortfolioService service;
|
|
|
|
|
|
|
|
- @GetMapping
|
|
|
|
|
- public ResponseEntity<Object> getAll() {
|
|
|
|
|
- List<Portfolio> response = service.getAll();
|
|
|
|
|
- return ResponseEntity.ok(response);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@GetMapping("{id}")
|
|
@GetMapping("{id}")
|
|
|
public ResponseEntity<Object> get(@PathVariable String id) {
|
|
public ResponseEntity<Object> get(@PathVariable String id) {
|
|
|
Portfolio response = service.get(id);
|
|
Portfolio response = service.get(id);
|