added changes to verify student using QR code number and password instead

This commit is contained in:
JBB0807 2025-05-05 18:49:51 -07:00
parent 4b1cb0e7f1
commit 8e1af2e846
2 changed files with 8 additions and 8 deletions

View file

@ -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() {
</div> */}
<input
type="assignmentId"
placeholder="Assignment ID"
name="assignmentId"
value={state.assignmentId}
type="number"
placeholder="Assignment QR Number"
name="qrNumber"
value={state.qrNumber}
onChange={handleChange}
/>
<input