Commit 1bf70669 authored by thibaut-felten's avatar thibaut-felten
parents 7d046c74 f5bf9b53
...@@ -3,11 +3,9 @@ ...@@ -3,11 +3,9 @@
<LoginNavbar></LoginNavbar> <LoginNavbar></LoginNavbar>
<div class="row _centered"> <div class="row _centered">
<div class="column _600"> <div class="column _600">
<form>
<tr><label class="label">Code de la partie :</label></tr> <tr><label class="label">Code de la partie :</label></tr>
<tr><input v-model="idgame" class="codeGame" id="codeGame" required></tr> <tr><input v-model="idgame" class="codeGame" id="codeGame" required></tr>
<tr><button @click="rejoindre()" type="submit" id="btn">Rejoindre</button></tr> <tr><button @click="rejoindre()" id="btn">Rejoindre</button></tr>
</form>
</div> </div>
</div> </div>
</div> </div>
...@@ -24,8 +22,6 @@ export default { ...@@ -24,8 +22,6 @@ export default {
methods: { methods: {
rejoindre: async function(){ rejoindre: async function(){
if((Number(this.idgame) != this.idgame || Number(this.idgame) < 0 )){ if((Number(this.idgame) != this.idgame || Number(this.idgame) < 0 )){
console.log(Number(this.idgame) != this.idgame)
console.log(Number(this.idgame) < 0)
return return
} }
const url = sessionStorage.getItem('APIURL') + "/gameuser" const url = sessionStorage.getItem('APIURL') + "/gameuser"
...@@ -41,7 +37,7 @@ export default { ...@@ -41,7 +37,7 @@ export default {
game.id=this.idgame; game.id=this.idgame;
let response = await fetch(url, params) let response = await fetch(url, params)
console.log(response) console.log(response)
this.$router.push("/playerPrivate") this.$router.push("/playerPrivate")
} }
}, },
components: { 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