tidying
This commit is contained in:
parent
9e2c07ba38
commit
b9b061ba19
@ -40,14 +40,10 @@ app.post('/auth', function(request, response) {
|
|||||||
const username = request.body.u;
|
const username = request.body.u;
|
||||||
const password = request.body.p;
|
const password = request.body.p;
|
||||||
|
|
||||||
console.log(username, password);
|
|
||||||
|
|
||||||
if (username && password)
|
if (username && password)
|
||||||
|
|
||||||
db.getOne(username, password)
|
db.getOne(username, password)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log('data', data);
|
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
response.send('Incorrect Username and/or Password!');
|
response.send('Incorrect Username and/or Password!');
|
||||||
|
|
||||||
@ -75,5 +71,5 @@ require('./server/routes/view.routes')(app);
|
|||||||
|
|
||||||
// listen for requests
|
// listen for requests
|
||||||
app.listen(serverPort, () => {
|
app.listen(serverPort, () => {
|
||||||
console.log('Server is listening on port 3000');
|
console.log(`Server is listening on port ${serverPort}`);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user