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

API URL

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