Commit 1bf70669 authored by thibaut-felten's avatar thibaut-felten
parents 7d046c74 f5bf9b53
......@@ -3,11 +3,9 @@
<LoginNavbar></LoginNavbar>
<div class="row _centered">
<div class="column _600">
<form>
<tr><label class="label">Code de la partie :</label></tr>
<tr><input v-model="idgame" class="codeGame" id="codeGame" required></tr>
<tr><button @click="rejoindre()" type="submit" id="btn">Rejoindre</button></tr>
</form>
<tr><button @click="rejoindre()" id="btn">Rejoindre</button></tr>
</div>
</div>
</div>
......@@ -24,8 +22,6 @@ export default {
methods: {
rejoindre: async function(){
if((Number(this.idgame) != this.idgame || Number(this.idgame) < 0 )){
console.log(Number(this.idgame) != this.idgame)
console.log(Number(this.idgame) < 0)
return
}
const url = sessionStorage.getItem('APIURL') + "/gameuser"
......@@ -41,7 +37,7 @@ export default {
game.id=this.idgame;
let response = await fetch(url, params)
console.log(response)
this.$router.push("/playerPrivate")
this.$router.push("/playerPrivate")
}
},
components: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment