From 14942788e7c030ed852e310b406781bb596ba6fc Mon Sep 17 00:00:00 2001 From: "gwenael.planchon" Date: Wed, 3 Apr 2024 08:19:05 +0200 Subject: [PATCH] rejoindre la partie automatiquement quand on cree un kahoot --- science-quest/src/components/jeux/kahoot/Kahoot.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/science-quest/src/components/jeux/kahoot/Kahoot.vue b/science-quest/src/components/jeux/kahoot/Kahoot.vue index a5b4a87..216e406 100644 --- a/science-quest/src/components/jeux/kahoot/Kahoot.vue +++ b/science-quest/src/components/jeux/kahoot/Kahoot.vue @@ -46,7 +46,13 @@ export default { "thematiques": this.choixThematiques, "idDifficulte": this.choixDifficulte }) - partie.creerPartie().then(a=>console.log(a)) + partie.creerPartie().then(kahoot=>{ + //fermer la popup + fermerPopup.click() + //rejoindre sa propre partie + this.codeKahootARejoindre=kahoot.codeInvitation + this.rejoindrePartie() + }) }, // TODO : demander a l'api de rejoindre un kahoot (et rediriger vers la partie si possible via HATEOAS) rejoindrePartie(){ @@ -126,7 +132,7 @@ export default {