Skip to content

Commit

Permalink
Añadido redireccionamiento a "/addRecord"
Browse files Browse the repository at this point in the history
  • Loading branch information
uo287627 committed Mar 7, 2024
1 parent f8c749d commit 67900cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ app.post('/adduser', async (req, res) => {
}
});

app.post('/addRecord', async(req, res) => {
try{
const recordResponse = await axios.post(questionServiceUrl+'/addRecord', req.body);
}catch (error){
res.status(error.response.status).json({ error: error.response.data.error });
}
});

app.post('/getQuestionBody', async (req, res) => {
try {
// Forward the add user request to the user service
Expand Down

0 comments on commit 67900cf

Please sign in to comment.