Click here to Skip to main content
14,870,416 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
 according to the browser when i inspect i c the following message :<pre>POST http://localhost:5000/user/signup 500 (Internal Server Error)
i m using redux for data management and when i click on the error in the browser it redirects me to the file s related to redux 
and the error comes from the backend i m confused help 


What I have tried:

i have changed the data type in fact its a little bit complicated googled it and did my researches and i changed it to this schema:
const userSchema =mongoose.Schema({

    Nom:{type:String, required :true},
    Prenom:{type:String, required :true},
    dNaissance: Date,
    Gender:{type:String,
    enum:["homme","femme"],
    default:"homme"
    },
    Email: {type:String, required :true},
    Photo:String,
    Gouvernorat:[String],
    Cinteret:[String],
    Password:String,
    
    Nfollowers:{type:Number,default:0},
    Nfollowing:{type:Number,default:0},
}) 

i tried also with postman and the request went ok and gave response
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900