Removed logging from user model
This commit is contained in:
@@ -20,12 +20,9 @@ class User extends Table{
|
|||||||
|
|
||||||
static async create(data) {
|
static async create(data) {
|
||||||
try{
|
try{
|
||||||
console.log('hash?')
|
|
||||||
data['password'] = await bcrypt.hash(data['password'], saltRounds);
|
data['password'] = await bcrypt.hash(data['password'], saltRounds);
|
||||||
console.log('hashed password', data.password);
|
|
||||||
data['backing'] = data['backing'] || 'redis';
|
data['backing'] = data['backing'] || 'redis';
|
||||||
|
|
||||||
|
|
||||||
return await super.create(data)
|
return await super.create(data)
|
||||||
|
|
||||||
}catch(error){
|
}catch(error){
|
||||||
@@ -45,12 +42,7 @@ class User extends Table{
|
|||||||
|
|
||||||
static async login(data){
|
static async login(data){
|
||||||
try{
|
try{
|
||||||
|
|
||||||
console.log('login data', data)
|
|
||||||
|
|
||||||
let user = await User.get(data);
|
let user = await User.get(data);
|
||||||
|
|
||||||
console.log('login user', user)
|
|
||||||
let auth = await bcrypt.compare(data.password, user.password);
|
let auth = await bcrypt.compare(data.password, user.password);
|
||||||
|
|
||||||
if(auth){
|
if(auth){
|
||||||
|
|||||||
Reference in New Issue
Block a user