Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
How to post array of Subdocument, and check with Postman?

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?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda