backend con panel admin funcional
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.example.fercoganbackend.service;
|
||||
|
||||
import com.example.fercoganbackend.entity.Puja;
|
||||
import com.example.fercoganbackend.repository.PujaRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
public class PujaService {
|
||||
|
||||
@Autowired
|
||||
private PujaRepository pujaRepository;
|
||||
|
||||
public List<Puja> findAll() {
|
||||
return pujaRepository.findAll();
|
||||
}
|
||||
|
||||
public Optional<Puja> findById(Long id) {
|
||||
return pujaRepository.findById(id);
|
||||
}
|
||||
|
||||
public Puja save(Puja remate) {
|
||||
return pujaRepository.save(remate);
|
||||
}
|
||||
|
||||
public void delete(Long id) {
|
||||
pujaRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user