mirror of https://github.com/xfarrow/blink
update
This commit is contained in:
parent
5835bfbc16
commit
ca5e201dc4
|
@ -23,7 +23,6 @@ const helmet = require('helmet')
|
||||||
const personRoutes = require('./routes/person_routes.js');
|
const personRoutes = require('./routes/person_routes.js');
|
||||||
const organizationRoutes = require('./routes/organization_routes.js');
|
const organizationRoutes = require('./routes/organization_routes.js');
|
||||||
const organizationAdminRoutes = require('./routes/organization_admin_routes.js');
|
const organizationAdminRoutes = require('./routes/organization_admin_routes.js');
|
||||||
const organizationPostRoutes = require('./routes/organization_post_routes.js');
|
|
||||||
const jobOffersRoutes = require('./routes/job_offer_routes.js');
|
const jobOffersRoutes = require('./routes/job_offer_routes.js');
|
||||||
const serverRoutes = require('./routes/server_routes.js');
|
const serverRoutes = require('./routes/server_routes.js');
|
||||||
const resetPasswordRoutes = require('./routes/reset_password_routes.js');
|
const resetPasswordRoutes = require('./routes/reset_password_routes.js');
|
||||||
|
@ -55,7 +54,6 @@ app.use('/api/persons', personRoutes.protectedRoutes);
|
||||||
app.use('/api/organizations', organizationRoutes.routes);
|
app.use('/api/organizations', organizationRoutes.routes);
|
||||||
app.use('/api/organizations', jobOffersRoutes.routes);
|
app.use('/api/organizations', jobOffersRoutes.routes);
|
||||||
app.use('/api/organizations', organizationAdminRoutes.routes);
|
app.use('/api/organizations', organizationAdminRoutes.routes);
|
||||||
app.use('/api/organizations', organizationPostRoutes.routes);
|
|
||||||
app.use('/api/resetpassword', resetPasswordRoutes.routes);
|
app.use('/api/resetpassword', resetPasswordRoutes.routes);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -50,17 +50,17 @@ const updatePersonValidator = [
|
||||||
}),
|
}),
|
||||||
check('dateOfBirth').optional().isDate().withMessage('Invalid date format. Date must be YYYY-MM-DD'),
|
check('dateOfBirth').optional().isDate().withMessage('Invalid date format. Date must be YYYY-MM-DD'),
|
||||||
check('openToWork').optional().isBoolean(),
|
check('openToWork').optional().isBoolean(),
|
||||||
check('placeOfLiving').isLength({
|
check('placeOfLiving').optional().isLength({
|
||||||
max: 128
|
max: 128
|
||||||
}).escape(),
|
}).escape(),
|
||||||
check('aboutMe').isLength({
|
check('aboutMe').optional().isLength({
|
||||||
max: 4096
|
max: 4096
|
||||||
}).escape(),
|
}).escape(),
|
||||||
check('qualification').isLength({
|
check('qualification').optional().isLength({
|
||||||
max: 64
|
max: 64
|
||||||
}).escape(),
|
}).escape(),
|
||||||
check('old_password').trim().escape(),
|
check('oldPassword').optional().trim().escape(),
|
||||||
check('new_password').isLength({
|
check('newPassword').optional().isLength({
|
||||||
min: 5
|
min: 5
|
||||||
}).trim().escape().withMessage('Password must be at least 5 characters'),
|
}).trim().escape().withMessage('Password must be at least 5 characters'),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue