backend-api #6
.gitea/workflows
.gitignoreMakefileMyINPulse-back
build.gradle
src
main
java
enseirb
myinpulse
MyinpulseApplication.java
api
config
postgres_db
controller
AdministrateursController.javaComptesRendusController.javaEntrepreneursController.javaProjetsController.javaRendezVousController.javaSectionsController.javaUtilisateursController.java
model
Administrateurs.javaComptesRendus.javaEntrepreneurs.javaProjets.javaRendezVous.javaSections.javaUtilisateurs.java
repository
security
resources
test
java
enseirb
myinpulse
config
backdev.docker-compose.yamlbackdev.main.envfrontdev.docker-compose.yamlfrontdev.main.envprod.docker-compose.yamlprod.main.env
front/MyINPulse-front/src/components
postgres
3
MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/controller/AdministrateursController.java
3
MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/controller/AdministrateursController.java
@ -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();
|
||||
}
|
||||
|
6
MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/controller/EntrepreneursController.java
6
MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/controller/EntrepreneursController.java
@ -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);
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user