Skip to content

Commit 6beccac

Browse files
author
Utkarsh
committed
front end changed for username
1 parent 0d1e00e commit 6beccac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

myShop-frontend/js/auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ document.addEventListener("DOMContentLoaded", () => {
3131
const password = e.target.password.value;
3232

3333
try {
34-
await registerUser({ firstName, lastName, email, password });
34+
// --- THIS IS THE FIX ---
35+
await registerUser({ firstName, lastName, email, password, username: email });
3536
alert("Registration successful! Please log in.");
3637
window.location.href = "login.html";
3738
} catch (error) {

0 commit comments

Comments
 (0)