This commit is contained in:
David Arranz 2019-08-05 11:07:07 +02:00
parent 2f21d8d2cd
commit afb5d0883c
3 changed files with 1 additions and 2 deletions

View File

@ -45,7 +45,6 @@ passport.use('local-email', new LocalStrategy(localEmailOptions, async (email, p
if (_.isNull(user)) {
return done(null, false, { message: 'User not found' })
} else {
var password_encoded = crypto.createHash('sha512').update(password).digest('hex');
const isPasswordValid = await user.comparePassword(password_encoded);
if (!isPasswordValid) {

View File

@ -11,6 +11,7 @@ const AccessValidator = require('../../middlewares/accessValidator');
//const { ModelHandler } = require('sequelize-handlers');
//const postHandler = new ModelHandler(models.Post);
// [ADMIN] - LogiN
routes.post('/auth',
SchemaValidator(authValidation.LoginWinEmailInputType, true),
AccessValidator.isRegisteredUserEmail,

View File

@ -7,7 +7,6 @@ const extraMethods = {
findUser: async (params, context) => {
return await models.User.findOne({
where: params,
raw: true, // <- para evitar tener que hacer .toJson al final
});
},