i’m trying to store a boolean in mongodb but it always returns false
here’s my database
const UserSchema = new Schema({
name: String,
password: {
type: String,
required: true
},
isAdmin: {
type: Boolean,
default: false
},
this how i post the request using postman
{
"name": "aj",
"password":"aj",
"admin": true
}
this the result i get in my database
isAdmin:false
name:"aj"
password:"$2a$10$wBfElJ3YbZoOk3Bz/tyFc.uzZGuzStDppDCINZ8mZexZKumnDMmoW"
please how can i set it admin to true or false when registering