Skip to content

Commit

Permalink
Update question-service.js
Browse files Browse the repository at this point in the history
  • Loading branch information
uo276976 authored Mar 4, 2024
1 parent ac25f92 commit 2b7b7c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions questionservice/question-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ app.post('/addquestion', async (req, res) => {
// Guarda la nueva pregunta en la base de datos
const savedQuestion = await newQuestion.save();

res.status(1).json(savedQuestion);
res.status(201).json(savedQuestion);
} catch (error) {
res.status(500).json({ error: 'Internal Server Error' });
}
Expand All @@ -54,4 +54,4 @@ server.on('close', () => {
mongoose.connection.close();
});

module.exports = server;
module.exports = server;

0 comments on commit 2b7b7c1

Please sign in to comment.