From 4c2db76344d78a5cb93b51a1f14e8f5eb945317f Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Fri, 16 Apr 2021 19:33:08 -0500 Subject: aaaaaaaaaaaaaaaaaaaaaa --- csci4131/hw6/strap012_hw6/dbio.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'csci4131/hw6/strap012_hw6/dbio.js') diff --git a/csci4131/hw6/strap012_hw6/dbio.js b/csci4131/hw6/strap012_hw6/dbio.js index 538fa5a..ab3ec42 100644 --- a/csci4131/hw6/strap012_hw6/dbio.js +++ b/csci4131/hw6/strap012_hw6/dbio.js @@ -16,10 +16,9 @@ connection.connect(function(err) { console.log("Connected to MYSQL database!"); }); -function passcheck(user,pass) { +async function passcheck(user,pass) { let ret = ''; connection.query('SELECT * FROM tbl_accounts', function(err,rows,fields) { - if (err) throw err; if (rows.length == 0) { console.log("There are no entries in the accounts field!"); @@ -32,8 +31,9 @@ function passcheck(user,pass) { } } } - }); return ret; + }); + } function getContacts() { @@ -68,4 +68,4 @@ var ISBN = '0000002345'; // console.log ("Version 2 values inserted"); // }); - +exports.query = passcheck; -- cgit v1.2.3