feat: created a better account creation flow
All checks were successful
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 5m20s
CI / build (push) Successful in 11s

This commit is contained in:
Pierre Tellier
2025-04-09 17:39:43 +02:00
parent 385c5cd8d0
commit 66be0baca6
14 changed files with 377 additions and 88 deletions

View File

@ -122,4 +122,17 @@ public class EntrepreneurService {
public Iterable<Entrepreneur> GetEntrepreneurByProject(Project project) {
return this.entrepreneurRepository.getEntrepreneurByProjectParticipation(project);
}
public void deleteEntrepreneur(Entrepreneur e) {
this.entrepreneurRepository.delete(e);
}
public void validateEntrepreneurById(Long id) {
Optional<Entrepreneur> e = this.entrepreneurRepository.findById(id);
if (e.isEmpty()) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Entrepreneur n'existe pas");
}
e.get().setPending(false);
this.entrepreneurRepository.save(e.get());
}
}