diff --git a/webapp/src/components/auth/AuthUtils.js b/webapp/src/components/auth/AuthUtils.js index 9da36bef..f33e134e 100644 --- a/webapp/src/components/auth/AuthUtils.js +++ b/webapp/src/components/auth/AuthUtils.js @@ -21,7 +21,7 @@ export function getLoginData() { export async function login(loginData, onSuccess, onError) { try { - let requestAnswer = await axios.post(process.env.REACT_APP_API_ENDPOINT + "/auth/login", loginData); + let requestAnswer = await axios.post("http://98.66.168.12:8080" + "/auth/login", loginData); if (HttpStatusCode.Ok === requestAnswer.status) { saveToken(requestAnswer); onSuccess(); @@ -35,7 +35,7 @@ export async function login(loginData, onSuccess, onError) { export async function register(registerData, onSuccess, onError) { try { - let requestAnswer = await axios.post(process.env.REACT_APP_API_ENDPOINT + "/auth/register", registerData); + let requestAnswer = await axios.post("http://98.66.168.12:8080" + "/auth/register", registerData); if (HttpStatusCode.Ok === requestAnswer.status) { saveToken(requestAnswer); onSuccess(); diff --git a/webapp/src/components/game/Logout.js b/webapp/src/components/game/Logout.js index e1044e57..9f378628 100644 --- a/webapp/src/components/game/Logout.js +++ b/webapp/src/components/game/Logout.js @@ -2,7 +2,7 @@ import axios from "axios"; export async function logoutUser() { try { - await axios.get(process.env.REACT_APP_API_ENDPOINT + "/auth/logout"); + await axios.get("http://98.66.168.12:8080" + "/auth/logout"); sessionStorage.removeItem("jwtToken"); sessionStorage.removeItem("jwtRefreshToken"); } catch (error) { diff --git a/webapp/src/components/game/Questions.js b/webapp/src/components/game/Questions.js index 32b6c239..b7c5c72b 100644 --- a/webapp/src/components/game/Questions.js +++ b/webapp/src/components/game/Questions.js @@ -2,7 +2,7 @@ import axios, { HttpStatusCode } from "axios"; export async function getQuestion() { try { - let requestAnswer = await axios.get(process.env.REACT_APP_API_ENDPOINT + "/questions/new"); + let requestAnswer = await axios.get("http://98.66.168.12:8080" + "/questions/new"); if (HttpStatusCode.Ok === requestAnswer.status) { return requestAnswer.data; } @@ -13,7 +13,7 @@ export async function getQuestion() { export async function answerQuestion(questionId, aId) { try { - let requestAnswer = await axios.post(process.env.REACT_APP_API_ENDPOINT + "/questions/" + questionId + "/answer", {answer_id:aId}); + let requestAnswer = await axios.post("http://98.66.168.12:8080" + "/questions/" + questionId + "/answer", {answer_id:aId}); if (HttpStatusCode.Ok === requestAnswer.status) { return requestAnswer.data; }