diff --git a/README.md b/README.md index 4518530..45cc8c9 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ To run just server: ``` npm run server # in root folder npm run dev # in backend folder +``` ## Git Commands Guide diff --git a/backend/server.js b/backend/server.js index a781b75..d80d932 100644 --- a/backend/server.js +++ b/backend/server.js @@ -109,7 +109,7 @@ app.post('/api/users', async (req, res) => { // Login // TODO (Donatello & John): Create an endpoint to receive login data and check if the user exists in the database -app.post('/login', async (req, res) => { +app.post('/api/login', async (req, res) => { const { username, password } = req.body; // DEBUG: console.log('Received login request:', username ); diff --git a/src/fonts/AvenirLTStd-Light.otf b/src/fonts/AvenirLTStd-Light.otf deleted file mode 100644 index 37b6128..0000000 Binary files a/src/fonts/AvenirLTStd-Light.otf and /dev/null differ diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx index 8367bd5..34c9c18 100644 --- a/src/pages/Login.jsx +++ b/src/pages/Login.jsx @@ -13,16 +13,16 @@ export default function Login() { const handleSubmit = async (e) => { e.preventDefault(); - const { username, password } = formData; + // const { username, password } = formData; // alert(`Form submitted with\nusername: ${username}\nand password: ${password}`) try { - const response = await fetch('http://localhost:4000/login', { + const response = await fetch('http://localhost:4000/api/login', { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ username, password }), + body: JSON.stringify(formData), }); if (response.ok) {