This is my schema. But I'm not able to insert data to bicepsExcercise image Please help me with Controllers to add some data in Biceps Excercise. When I try to insert the Data directly by accessing excercise nothing happens. I want to insert data in bicepsExcercise and in Image field
const mongoose = require('mongoose')
const DataModel = new mongoose.Schema({
excercise: [{
bicepsExerciseImage: {
image: {
type: String
},
bicepsExercise: {
type: {
type: String
},
name: {
type: String,
},
videoUrl: {
type: String,
},
time: {
type: String,
default: "Null"
},
image: {
type: String,
}
},
}
}]
})
module.exports = mongoose.model('DataModels', DataModel)