Skip to content

Commit

Permalink
Insert Query issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwal2431 committed Jan 2, 2025
1 parent 7be2101 commit 3215fa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/dbQuery.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CREATE TABLE user_table (
username VARCHAR(60) NOT NULL,
email VARCHAR(80) NOT NULL UNIQUE,
password VARCHAR(140) NOT NULL UNIQUE,
otp VARCHAR(6) -- Add the otp column to store OTP values
otp VARCHAR(6) DEFAULT NULL-- Add the otp column to store OTP values
);

-- Create the info_table
Expand Down
2 changes: 1 addition & 1 deletion login-system/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const signup = async (req, res) => {
return res.status(409).send('Username Already in Use');
}
} else {
const sqlInsert = 'INSERT INTO user_table VALUES (0, ?, ?, ?)';
const sqlInsert = 'INSERT INTO user_table VALUES (0, ?, ?, ?, null)';
await connection.query(sqlInsert, [username, email, hashpassword]);
console.log('Created a new User');
const sub = 'Signup-Research Nexas';
Expand Down

0 comments on commit 3215fa2

Please sign in to comment.