1
0
forked from PGL/Clyde

changed details

This commit is contained in:
Bartha Maxime 2024-03-14 20:04:27 +01:00
parent f0a411c031
commit 9aa425d1c3

View File

@ -4,31 +4,24 @@ import org.springframework.stereotype.Service;
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
import ovh.herisson.Clyde.Tables.InscriptionRequest;
import java.util.HashMap;
import java.util.Map;
@Service
public class InscriptionService {
InscriptionRepository incriptionRepo;
public void save(InscriptionRequest inscriptionRequest){
incriptionRepo.save(inscriptionRequest);
}
InscriptionRepository inscriptionRepo;
public InscriptionService(InscriptionRepository inscriptionRepo){
this.incriptionRepo = inscriptionRepo;
this.inscriptionRepo = inscriptionRepo;
}
public void save(InscriptionRequest inscriptionRequest){
inscriptionRepo.save(inscriptionRequest);
}
public InscriptionRequest getById(long id){
InscriptionRequest inscriptionRequest = incriptionRepo.findById(id);
if (inscriptionRequest == null){
return null;
}
return inscriptionRequest;
return inscriptionRepo.findById(id);
}
public Iterable<InscriptionRequest> getAll(){
return incriptionRepo.findAll();
return inscriptionRepo.findAll();
}
}