Skip to content

Commit

Permalink
fix: endpoints vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed Mar 8, 2024
1 parent f360ec8 commit c97bd61
Showing 1 changed file with 2 additions and 2 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 + process.env.REACT_APP_LOGIN_ENDPOINT, loginData);
let requestAnswer = await axios.post(process.env.REACT_APP_API_ENDPOINT + "/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 + process.env.REACT_APP_REGISTER_ENDPOINT, registerData);
let requestAnswer = await axios.post(process.env.REACT_APP_API_ENDPOINT + "/auth/register", registerData);
if (HttpStatusCode.Ok === requestAnswer.status) {
saveToken(requestAnswer);
onSuccess();
Expand Down

0 comments on commit c97bd61

Please sign in to comment.