ajout route status

Springboot
Victor SOULIER 1 year ago
parent 30647d93e3
commit 567be9b94f

@ -115,6 +115,14 @@ public class PartieKahootController {
return this.modelMapper.map(partieKahoot, PartieKahootStatusDTO.class); return this.modelMapper.map(partieKahoot, PartieKahootStatusDTO.class);
} }
@GetMapping(value = "/{codeInvitation}/status", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
public PartieKahootStatusDTO getStatusPartie(@PathVariable String codeInvitation){
PartieKahoot partieKahoot = this.partieKahootService.getPartieKahootByIdOrCodeInvitation(codeInvitation);
partieKahoot = this.partieKahootService.maintenirAJourQuestionActuel(partieKahoot);
return this.modelMapper.map(partieKahoot, PartieKahootStatusDTO.class);
}
@GetMapping(value = "/{codeInvitation}/question", produces = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/{codeInvitation}/question", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
public PartieKahootQuestionDTO getQuestionActuel(@PathVariable String codeInvitation){ public PartieKahootQuestionDTO getQuestionActuel(@PathVariable String codeInvitation){

Loading…
Cancel
Save