Skip to content
Snippets Groups Projects
Commit 1d7ae2b9 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Add nickname field

parent eaa6bfb6
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!79Add nickname field
Pipeline #
...@@ -23,6 +23,10 @@ var UserSchema = new Schema({ ...@@ -23,6 +23,10 @@ var UserSchema = new Schema({
type: String, type: String,
required: [true, 'O campo Nome é obrigatório.'] required: [true, 'O campo Nome é obrigatório.']
}, },
nickname: {
type: String,
required: [true, 'O campo Apelido é obrigatório.']
},
cpf:{ cpf:{
type: String, type: String,
unique: true, unique: true,
...@@ -30,7 +34,7 @@ var UserSchema = new Schema({ ...@@ -30,7 +34,7 @@ var UserSchema = new Schema({
}, },
schooling: { schooling: {
type: String, type: String,
required: [true, 'O campo Escolaridade é obrigatório.'] required: [true, 'O campo Formação é obrigatório.']
}, },
course: { course: {
type: String, type: String,
...@@ -45,7 +49,7 @@ var UserSchema = new Schema({ ...@@ -45,7 +49,7 @@ var UserSchema = new Schema({
}, },
institutionName: { institutionName: {
type: String, type: String,
required: [true, 'O campo Instituição em que trabalha é obrigatório.'] required: [true, 'O campo Instituição em que trabalha ou estuda é obrigatório.']
}, },
state: { state: {
type: String, type: String,
......
...@@ -121,6 +121,7 @@ userApp.post('/', (req, res, next) => { ...@@ -121,6 +121,7 @@ userApp.post('/', (req, res, next) => {
email: req.body.email, email: req.body.email,
password: req.body.password, password: req.body.password,
name: req.body.name, name: req.body.name,
nickname: req.body.nickname,
cpf: req.body.cpf, cpf: req.body.cpf,
cep: req.body.cep, cep: req.body.cep,
complement: req.body.complement, complement: req.body.complement,
......
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