mirror of
https://github.com/janishutz/libreevent.git
synced 2026-09-22 13:15:25 +02:00
mysql db partially integrated
This commit is contained in:
1 parent
5270317e2d
commit
a8cf4ec9a4
6 files changed
+35
-11
No files matched your search
@@ -16,9 +16,9 @@
|
||||
const bcrypt = require( 'bcrypt' );
|
||||
const db = require( '../db/db.js' );
|
||||
|
||||
module.exports.checkpassword = function checkpassword ( username, password ) {
|
||||
module.exports.checkpassword = function checkpassword ( email, password ) {
|
||||
return new Promise( resolve => {
|
||||
db.getData( 'user', username ).then( data => {
|
||||
db.getDataSimple( 'user', 'email', email ).then( data => {
|
||||
bcrypt.compare( password, data ).then( data => {
|
||||
resolve( data );
|
||||
} );
|
||||
|
||||
Reference in new issue
Block a user