Commit f5bf9b53 authored by Robin Borgogno's avatar Robin Borgogno

joinPrivate

parent ba60d466
......@@ -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 = "http://localhost/felten/projet-cdaw/backend/MVC/api.php/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