package com.prudas.app.controller;

import com.prudas.app.dto.TestimonialResponse;
import com.prudas.app.service.TestimonialService;
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/testimonials")
@RequiredArgsConstructor
public class TestimonialController {

    private final TestimonialService service;

    @GetMapping
    public List<TestimonialResponse> findAll() {
        return service.findAll();
    }
}
