On the server side I have a model and a controller to execute the POST action. However it is giving results of 404.
model would contain array of subdocuments. for example **
[AnswerSchema]
{answer: String,
index: Number}
[QuestionsSchema]
{question: String,
answers: [AnswerSchema],...}
[QuizSchema]
{questions: [QuestionSchema],...}
**
in the controller side it would with an aysnc function
**
const newQuiz = new Quiz({
questions: req.body.questions
});
const savedQuiz = await newQuiz.save();
**
but while using Postman it wouldn't execute the post and give a 404 page. do I need to have any "push" for the questions in the controller side? or is there a hight possibility that there is something wrong with the data tested in postman?