Commit 9d25bcbe authored by thibaut-felten's avatar thibaut-felten

API URL

parent d7cc07a9
......@@ -14,7 +14,7 @@ export default {
methods: {
ajouterUser: async function() {
await fetch(
`http://localhost/felten/projet-cdaw/backend/MVC/api.php/online/${user.id}`,
sessionStorage.getItem('APIURL') + `/online/${user.id}`,
{
method: "POST",
}
......@@ -24,7 +24,7 @@ export default {
findGame: async function(){
console.log(user.id)
const res = await fetch(
`http://localhost/felten/projet-cdaw/backend/MVC/api.php/online/${user.id}`,
sessionStorage.getItem('APIURL') + `/online/${user.id}`,
{
method: "GET"
}
......@@ -42,7 +42,7 @@ export default {
}, 1000)
},
goGame: async function(gameID) {
let url = "http://localhost/felten/projet-cdaw/backend/MVC/api.php/gameuser/game"
let url = sessionStorage.getItem('APIURL') + "/gameuser/game"
console.log(gameID)
url += "/" + gameID;
var params = {
......
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