LeadProductController.java
package cz.vsb.crm.controller;
import cz.vsb.crm.dto.LeadProductView;
import cz.vsb.crm.service.LeadService;
import lombok.RequiredArgsConstructor;
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
@RequestMapping("/api/lead-products")
@RequiredArgsConstructor
public class LeadProductController {
private final LeadService leadService;
@GetMapping
public List<LeadProductView> list() {
return leadService.getAllProductLines();
}
}