convert endpoint urls to env variables
This commit is contained in:
parent
28dd929927
commit
00c14f4eeb
4 changed files with 9 additions and 5 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import React from "react";
|
||||
import "@fortawesome/fontawesome-free/css/all.min.css";
|
||||
|
||||
const authUrl = import.meta.env.VITE_AUTH_URL;
|
||||
|
||||
function SignInForm() {
|
||||
const [state, setState] = React.useState({
|
||||
assignmentID: "",
|
||||
|
|
@ -21,7 +23,7 @@ function SignInForm() {
|
|||
console.log(`You are loggind in with email: ${assignmentId} and password: ${password}`);
|
||||
|
||||
console.log("Submitting login request with state:", state);
|
||||
fetch("http://localhost:8080/auth/student/login", {
|
||||
fetch(`${authUrl}/auth/student/login`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function SignUpForm() {
|
|||
|
||||
const googleAuth = () => {
|
||||
|
||||
window.open(authUrl, "_self");
|
||||
window.open(`${authUrl}/auth/google`, "_self");
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue