Skip to content

Commit

Permalink
added post history/question. It works, i ve tested it.
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-qg committed Mar 13, 2024
1 parent 3e40311 commit 95b4d1b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ app.post('/adduser', async (req, res) => {
}
});

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

app.get('/history/questions', async (req, res) => {
try {
const response = await axios.get(storeQuestionsServiceUrl+'/history/questions');
Expand Down

0 comments on commit 95b4d1b

Please sign in to comment.