fix bugs, full two fa system done

This commit is contained in:
2023-07-13 15:00:58 +02:00
parent 9f5d5a3be3
commit 5270317e2d
13 changed files with 158 additions and 19 deletions

View File

@@ -19,7 +19,9 @@ const db = require( '../db/db.js' );
module.exports.checkpassword = function checkpassword ( username, password ) {
return new Promise( resolve => {
db.getData( 'user', username ).then( data => {
resolve( bcrypt.compareSync( password, data ) );
bcrypt.compare( password, data ).then( data => {
resolve( data );
} );
} );
} );
};