fix(boot/auth): Fix typo
This commit is contained in:
committed by
mrugesh mohapatra
parent
5ea434c429
commit
550e1db9a4
@ -3,7 +3,7 @@ import { Observable } from 'rx';
|
|||||||
import dedent from 'dedent';
|
import dedent from 'dedent';
|
||||||
// import debugFactory from 'debug';
|
// import debugFactory from 'debug';
|
||||||
import { isEmail } from 'validator';
|
import { isEmail } from 'validator';
|
||||||
import { check, validationResults } from 'express-validator/check';
|
import { check, validationResult } from 'express-validator/check';
|
||||||
|
|
||||||
import { ifUserRedirectTo } from '../utils/middleware';
|
import { ifUserRedirectTo } from '../utils/middleware';
|
||||||
import {
|
import {
|
||||||
@ -79,7 +79,7 @@ module.exports = function enableAuthentication(app) {
|
|||||||
token: authTokenId
|
token: authTokenId
|
||||||
} = {}
|
} = {}
|
||||||
} = req;
|
} = req;
|
||||||
const validation = validationResults(req)
|
const validation = validationResult(req)
|
||||||
.formatWith(createValidatorErrorFormatter('info', '/email-signup'));
|
.formatWith(createValidatorErrorFormatter('info', '/email-signup'));
|
||||||
|
|
||||||
if (!validation.isEmpty()) {
|
if (!validation.isEmpty()) {
|
||||||
@ -229,7 +229,7 @@ module.exports = function enableAuthentication(app) {
|
|||||||
];
|
];
|
||||||
function postPasswordlessAuth(req, res, next) {
|
function postPasswordlessAuth(req, res, next) {
|
||||||
const { body: { email } = {} } = req;
|
const { body: { email } = {} } = req;
|
||||||
const validation = validationResults(req)
|
const validation = validationResult(req)
|
||||||
.formatWith(createValidatorErrorFormatter('info', '/email-signup'));
|
.formatWith(createValidatorErrorFormatter('info', '/email-signup'));
|
||||||
if (!validation.isEmpty()) {
|
if (!validation.isEmpty()) {
|
||||||
const errors = validation.array();
|
const errors = validation.array();
|
||||||
|
Reference in New Issue
Block a user