ORM models added
This commit is contained in:
@ -7,7 +7,6 @@ const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
require('dotenv').config()
|
||||
|
||||
// MySQL setup (replace with your MySQL connection details)
|
||||
const mysqlConfig = {
|
||||
host: process.env.host,
|
||||
user: process.env.user,
|
||||
@ -38,7 +37,7 @@ function isAuthenticated(req, res, next) {
|
||||
app.post('/login', (req, res) => {
|
||||
let { username, password } = req.body;
|
||||
|
||||
// Trim leading and trailing spaces from username
|
||||
// Trim whitespace
|
||||
username = username.trim();
|
||||
|
||||
// Validate username and password against MySQL
|
||||
|
Reference in New Issue
Block a user