Commit 356da694 authored by Robin Borgogno's avatar Robin Borgogno

enlevage des console.log

parent 05588046
......@@ -29,10 +29,6 @@ export default {
},
}
console.log(user.id);
</script>
<style scoped>
......
......@@ -4,7 +4,7 @@ import router from './router'
Vue.config.productionTip = false
sessionStorage.setItem('APIURL', 'http://localhost/projet-cdaw/backend/MVC/api.php')
sessionStorage.setItem('APIURL', 'http://localhost/felten/projet-cdaw/backend/MVC/api.php')
new Vue({
router,
......
......@@ -67,7 +67,6 @@ export default {
let response = await fetch(url, params)
let result = await response.json()
console.log(result)
document.getElementById("codeGame").innerHTML = result[0].id;
game.id = result[0].id;
// console.log(game.id)
......@@ -88,7 +87,6 @@ export default {
},
ajoutAdminGame: async function(){
const url = sessionStorage.getItem('APIURL') + "/gameuser"
console.log(game.id)
let data = {
"GAME_ID": game.id,
"USER_ID": user.id,
......@@ -102,7 +100,6 @@ export default {
},
JoueurPresent: async function(){
let url = sessionStorage.getItem('APIURL') + "/gameuser/game"
console.log(game.id)
url += "/" + game.id;
var params = {
method: "GET"
......@@ -119,7 +116,6 @@ export default {
return
}
setTimeout(() => {if(game.id){this.JoueurPresent()}}, 3000)
// setInterval(() => {if(game.id){this.JoueurPresent()}}, 3000)
},
retour: async function() {
......
......@@ -148,9 +148,6 @@ export default {
let rock = this.rock
let paper = this.paper
let scissors = this.scissors
console.log("ID : " + user.id)
console.log("TOKEN : " + user.token)
await fetch(
sessionStorage.getItem('APIURL') + `/user/${user.id}`,
{
......
......@@ -144,8 +144,6 @@ export default {
method: 'POST',
body : JSON.stringify(data) };
console.log(params.body.lastname)
fetch(url, params)
.then(response=>response.json())
.then(response=> {
......
......@@ -77,7 +77,6 @@ export default {
body : JSON.stringify(data) };
game.id=this.idgame;
let response = await fetch(url, params)
console.log(response)
this.$router.push("/playerPrivate")
}
},
......
......@@ -62,12 +62,9 @@ export default {
method: "GET"
}
)
console.log(res)
const result = await res.json()
console.log(result)
if (result.length >= 1) {
game.id = result
console.log(result)
this.goGame(result)
return
}
......@@ -78,7 +75,6 @@ export default {
goGame: async function(gameID) {
let url = sessionStorage.getItem('APIURL') + "/gameuser/game"
console.log(gameID)
url += "/" + gameID;
var params = {
method: "GET"
......
......@@ -38,19 +38,16 @@ export default {
},
JoueurPresent: async function(){
let url = sessionStorage.getItem('APIURL') + "/gameuser/game"
console.log(game.id)
url += "/" + game.id;
var params = {
method: "GET"
}
let response = await fetch(url,params)
let result = await response.json()
console.log(result)
let text = "";
result.forEach(user => {
text += `<tr><h2 class='joueur' id='joueur'>${user.USER_ID}</h2></tr>`
});
console.log(text)
document.getElementById("joueurs").innerHTML = text
if(result.length >= 2){
this.$router.push(`/game/${game.id}`)
......
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