Skip to content
Snippets Groups Projects
Commit 7989e90c authored by L4929's avatar L4929
Browse files

edited Ronnie's IP back to localhost

parent ffd8b801
No related branches found
No related tags found
2 merge requests!21Development,!20Add tracked players to map
......@@ -75,7 +75,7 @@ export class EditGameForm extends React.Component {
let token = sessionStorage.getItem("token");
// Send Game info to the server
fetch("http://172.20.2.143:5000/game/edit/" + this.props.gameId, {
fetch("http://localhost:5000/game/edit/" + this.props.gameId, {
method: "PUT",
headers: {
Authorization: "Bearer " + token,
......@@ -102,7 +102,7 @@ export class EditGameForm extends React.Component {
}
getGameInfo(gameId) {
fetch("http://172.20.2.143:5000/game/" + gameId)
fetch("http://localhost:5000/game/" + gameId)
.then(response => response.json())
.then(json => this.handleGameInfo(json))
.catch(error => console.log(error));
......
......@@ -18,7 +18,7 @@ class GameList extends React.Component {
}
getGames() {
fetch("http://172.20.2.143:5000/game/listgames")
fetch("http://localhost:5000/game/listgames")
.then(response => response.json())
.then(games => {
this.setState({
......
......@@ -38,7 +38,7 @@ export class LoginForm extends React.Component {
e.preventDefault();
// Send login info to the server
fetch(`http://172.20.2.143:5000/user/login`, {
fetch(`http://localhost:5000/user/login`, {
method: "POST",
headers: {
Accept: "application/json",
......
......@@ -77,7 +77,7 @@ export class NewGameForm extends React.Component {
let token = sessionStorage.getItem("token");
// Send Game info to the server
fetch("http://172.20.2.143:5000/game/new", {
fetch("http://localhost:5000/game/new", {
method: "POST",
headers: {
Authorization: "Bearer " + token,
......
......@@ -12,7 +12,7 @@ class Player extends Component {
getPlayers() {
fetch(
"http://172.20.2.143:5000/tracking/players/" + this.props.currentGameId,
"http://localhost:5000/tracking/players/" + this.props.currentGameId,
{
method: "GET",
headers: {
......
......@@ -44,7 +44,7 @@ export class RegisterForm extends React.Component {
this.handleError("Passwords do not match");
} else {
// Send register info to the server
fetch("http://172.20.2.143:5000/user/register", {
fetch("http://localhost:5000/user/register", {
method: "POST",
headers: {
Accept: "application/json",
......
......@@ -45,7 +45,7 @@ class UserMap extends Component {
// otherwise the fetch functions are the same in both if and else. any smarter way to do this?
if (isDeleted === true) {
fetch(
"http://172.20.2.143:5000/draw/mapdrawing/" + this.props.currentGameId,
"http://localhost:5000/draw/mapdrawing/" + this.props.currentGameId,
{
method: "PUT",
headers: {
......@@ -63,7 +63,7 @@ class UserMap extends Component {
);
} else {
fetch(
"http://172.20.2.143:5000/draw/mapdrawing/" + this.props.currentGameId,
"http://localhost:5000/draw/mapdrawing/" + this.props.currentGameId,
{
method: "PUT",
headers: {
......@@ -87,7 +87,7 @@ class UserMap extends Component {
// Get the drawings from the backend and add them to the state, so they can be drawn
fetchGeoJSON() {
fetch("http://172.20.2.143:5000/draw/map/" + this.props.currentGameId, {
fetch("http://localhost:5000/draw/map/" + this.props.currentGameId, {
method: "GET",
headers: {
Authorization: "Bearer " + sessionStorage.getItem("token"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment