.
This commit is contained in:
parent
2f21d8d2cd
commit
afb5d0883c
@ -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) {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user