Skip to content
Snippets Groups Projects
Commit cd6da73b authored by Lucas Gabriel Lima's avatar Lucas Gabriel Lima
Browse files

remove course from required fields

parent aa59e1c2
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!25Auth
Pipeline #
...@@ -12,7 +12,7 @@ const User = require(`${libs}/models/user`); ...@@ -12,7 +12,7 @@ const User = require(`${libs}/models/user`);
const jwt = require('jwt-simple'); const jwt = require('jwt-simple');
const required_fields = ["email", "password", "name", "cpf", "schooling", "course", "segment", "role", "institution_name", "state", "city"]; const required_fields = ["email", "password", "name", "cpf", "schooling", "segment", "role", "institution_name", "state", "city"];
function emailSyntax(email) { function emailSyntax(email) {
...@@ -43,10 +43,10 @@ userApp.post('/', (req, res, next) => { ...@@ -43,10 +43,10 @@ userApp.post('/', (req, res, next) => {
}, (req, res, next) => { }, (req, res, next) => {
for (let property of required_fields){ for (let property of required_fields){
if(!Object.prototype.hasOwnProperty.call(req.body, property)){ // if(!Object.prototype.hasOwnProperty.call(req.body, property)){
res.json({success: false, msg: 'Please fill out all mandatory fields.'}); // res.json({success: false, msg: 'Please fill out all mandatory fields.'});
return; // return;
} // }
} }
next(); next();
}, (req, res, next) => { }, (req, res, next) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment