package es.tatvil.taiageweb.empleo;

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/empleo")
public class EmpleoController {
    private final HistoricoRepository historicoRepository;

    public EmpleoController(HistoricoRepository historicoRepository) {
        this.historicoRepository = historicoRepository;
    }

    @GetMapping("/publicaciones")
    public List<PublicacionEmpleo> getPublicaciones() {
        return historicoRepository.obtenerTodas();
    }
}
