a
This commit is contained in:
parent
4a0ec9809c
commit
5780dacf5e
@ -38,6 +38,18 @@ async function login(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
async function login2(req, res, next) {
|
||||
try {
|
||||
res.status(httpStatus.OK).json({
|
||||
// token: tokens.token,
|
||||
// refreshToken: tokens.refreshToken,
|
||||
// user: data,
|
||||
})
|
||||
} catch (error) {
|
||||
controllerHelper.handleErrorResponse(MODULE_NAME, login.name, error, res)
|
||||
}
|
||||
}
|
||||
|
||||
async function register(req, res, next) {
|
||||
|
||||
function cleanAdminData(user) {
|
||||
@ -130,6 +142,7 @@ async function rejectToken(req, res, next) {
|
||||
|
||||
module.exports = {
|
||||
login,
|
||||
login2,
|
||||
register,
|
||||
regenerateToken,
|
||||
rejectToken,
|
||||
|
||||
@ -17,6 +17,12 @@ routes.post('/auth',
|
||||
authController.login,
|
||||
);
|
||||
|
||||
routes.get('/auth',
|
||||
// SchemaValidator(authValidation.LoginInputType, true),
|
||||
// AccessValidator.isRegisteredUserEmail,
|
||||
authController.login2,
|
||||
);
|
||||
|
||||
routes.post('/register',
|
||||
SchemaValidator(authValidation.RegisterInputType, true),
|
||||
AccessValidator.isRegisteredUserPhone,
|
||||
|
||||
@ -16,7 +16,7 @@ const generalInvalidFields = [
|
||||
|
||||
// Todos los ponentes
|
||||
routes.get('/speakers',
|
||||
isLoggedUser,
|
||||
//isLoggedUser,
|
||||
FieldMiddleware.middleware({
|
||||
invalidFields: generalInvalidFields
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user