Skip to content

Commit

Permalink
Removing console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-qg committed Mar 13, 2024
1 parent f10856f commit 8e4c669
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions storeQuestionService/store-q-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ mongoose.connect(mongoUri);
function validateRequiredFields(body, requiredFields) {
for (const field of requiredFields) {
if (!(field in body)) {
console.log(field)
console.log(body)
throw new Error(`Missing required field: ${field}`);
}
}
Expand Down Expand Up @@ -49,14 +47,11 @@ app.post('/history/questions', async (req, res) => {
throw new Error('Invalid request format. Expected an array of questions.');
}
for (const question of req.body) {
console.log(question)
validateRequiredFields(question, ['pregunta', 'respuesta_correcta', 'respuestas_incorrectas']);
}
console.log("Pasa validación")
const newQuestions = [];

for (const questionData of req.body) {
console.log(questionData)
const newQuestion = new Question({
pregunta: questionData.pregunta,
respuesta_correcta: questionData.respuesta_correcta,
Expand Down
1 change: 0 additions & 1 deletion webapp/src/storeQuestion/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function App(){
//eslint-disable-next-line
}, []);

console.log(preguntas)
return (
<>
<h2>Almacén de preguntas</h2>
Expand Down

0 comments on commit 8e4c669

Please sign in to comment.