backend-api #6

Merged
piair merged 107 commits from backend-api into main 2025-03-26 19:04:09 +01:00
17 changed files with 614 additions and 608 deletions
Showing only changes of commit f629fb4a4e - Show all commits

View File

@ -23,7 +23,8 @@ public class AdministrateursController {
public Administrateurs getAdministrateursById(@PathVariable Long id) {
Optional<Administrateurs> administrateur = this.administrateursRepository.findById(id);
if (administrateur.isEmpty()) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Cet administrateur n'existe pas");
throw new ResponseStatusException(
HttpStatus.NOT_FOUND, "Cet administrateur n'existe pas");
}
return administrateur.get();
}

View File

@ -23,7 +23,8 @@ public class EntrepreneursController {
public Entrepreneurs getEntrepreneursById(@PathVariable Long id) {
Optional<Entrepreneurs> entrepreneur = entrepreneursRepository.findById(id);
if (entrepreneur.isEmpty()) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Cet entrepreneur n'existe pas");
throw new ResponseStatusException(
HttpStatus.NOT_FOUND, "Cet entrepreneur n'existe pas");
}
return entrepreneur.get();
}
@ -38,7 +39,8 @@ public class EntrepreneursController {
@PathVariable Long id, String ecole, String filiere, Boolean status_snee) {
Optional<Entrepreneurs> entrepreneur = entrepreneursRepository.findById(id);
if (entrepreneur.isEmpty()) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Cet entrepreneur n'existe pas");
throw new ResponseStatusException(
HttpStatus.NOT_FOUND, "Cet entrepreneur n'existe pas");
}
if (ecole != null) {
entrepreneur.get().setEcole(ecole);

View File

@ -37,7 +37,10 @@ public class Sections {
public Sections() {}
public Sections(
Long id_section, String titre, String contenu_section, LocalDateTime date_modification) {
Long id_section,
String titre,
String contenu_section,
LocalDateTime date_modification) {
this.id_section = id_section;
this.titre = titre;
this.contenu_section = contenu_section;