fix error msg

Springboot
Victor SOULIER 1 year ago
parent 23dabb0350
commit 8a85187eac

@ -144,9 +144,12 @@ public class PartieKahootController {
partieKahoot = this.partieKahootService.maintenirAJourQuestionActuel(partieKahoot);
Joueur joueur = this.joueurService.findById(request.getIdJoueur());
if(partieKahoot.getStatus() != Status.Started){
if(partieKahoot.getStatus() == Status.Pending){
throw new PartyNotStartedException();
}
if(partieKahoot.getStatus() == Status.Ended){
throw new PartyIsEndedException();
}
if(partieKahoot.getJoueurs().stream().noneMatch(joueur1 -> Objects.equals(joueur1.getId(), joueur.getId()))){
throw new JoueurPasDansPartieException();

Loading…
Cancel
Save