From 8e1af2e846878a3db37ca4e64a97800e9cc606db Mon Sep 17 00:00:00 2001 From: JBB0807 <104856796+JBB0807@users.noreply.github.com> Date: Mon, 5 May 2025 18:49:51 -0700 Subject: [PATCH] added changes to verify student using QR code number and password instead --- src/pages/AssignmentPage.jsx | 2 +- src/pages/SignIn.jsx | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx index e0bec79..985ff15 100644 --- a/src/pages/AssignmentPage.jsx +++ b/src/pages/AssignmentPage.jsx @@ -75,7 +75,7 @@ const AssignmentPage = () => { formData.append("qrcodenumber", qrCodeNumber); formData.append("password", password); formData.append("description", description); - formData.append("intructoid", 9); + formData.append("instructorid", 9); if (file) { formData.append("file", file, file.name); } diff --git a/src/pages/SignIn.jsx b/src/pages/SignIn.jsx index ff2372e..9f6462e 100644 --- a/src/pages/SignIn.jsx +++ b/src/pages/SignIn.jsx @@ -5,7 +5,7 @@ const authUrl = import.meta.env.VITE_AUTH_URL; function SignInForm() { const [state, setState] = React.useState({ - assignmentID: "", + qrNumber: "", password: "", }); const handleChange = (evt) => { @@ -19,8 +19,8 @@ function SignInForm() { const handleOnSubmit = (evt) => { evt.preventDefault(); - const { assignmentId, password } = state; - console.log(`You are loggind in with email: ${assignmentId} and password: ${password}`); + const { qrNumber, password } = state; + console.log(`You are loggind in with email: ${qrNumber} and password: ${password}`); console.log("Submitting login request with state:", state); fetch(`${authUrl}/auth/student/login`, { @@ -59,10 +59,10 @@ function SignInForm() { */}