Skip to content

Commit

Permalink
fix: harcoded ip cause im tired
Browse files Browse the repository at this point in the history
Co-authored-by: Gonzalo Suárez Losada <[email protected]>
  • Loading branch information
Toto-hitori committed Mar 11, 2024
1 parent 1f2af04 commit 5c0eefb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions webapp/src/components/auth/AuthUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/game/Logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/game/Questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 5c0eefb

Please sign in to comment.