fixed db requirements in passport files

This commit is contained in:
bill bittner 2018-03-09 18:39:32 -08:00
parent 532702c095
commit 00a3e9be23
6 changed files with 124 additions and 126 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,8 +1,8 @@
const PassportLocalStrategy = require('passport-local').Strategy;
const logger = require('winston');
const db = require('../models');
module.exports = (db) => {
const returnUserAndChannelInfo = (userInstance) => {
const returnUserAndChannelInfo = (userInstance) => {
return new Promise((resolve, reject) => {
let userInfo = {};
userInfo['id'] = userInstance.id;
@ -22,9 +22,9 @@ module.exports = (db) => {
reject(error);
});
});
};
};
return new PassportLocalStrategy(
module.exports = new PassportLocalStrategy(
{
usernameField: 'username',
passwordField: 'password',
@ -62,5 +62,4 @@ module.exports = (db) => {
return done(error);
});
},
);
};
);

View file

@ -1,9 +1,9 @@
const PassportLocalStrategy = require('passport-local').Strategy;
const lbryApi = require('../helpers/lbryApi.js');
const logger = require('winston');
const db = require('../models');
module.exports = (db) => {
return new PassportLocalStrategy(
module.exports = new PassportLocalStrategy(
{
usernameField: 'username',
passwordField: 'password',
@ -61,5 +61,4 @@ module.exports = (db) => {
return done(error);
});
}
);
};
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long