Skip to content

Commit

Permalink
Fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
UO289930 committed Mar 14, 2024
1 parent 06529f2 commit aa39078
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.post('/login', async (req, res) => {
const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body);
res.json(authResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
console.error(error);
}
});

Expand All @@ -37,7 +37,7 @@ app.post('/adduser', async (req, res) => {
const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body);
res.json(userResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
console.error(error);
}
});

Expand All @@ -47,17 +47,17 @@ app.post('/edituser', async (req, res) => {
const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body);
res.json(userResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
console.error(error);
}
});

app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => {
try {
// Forward the edit user request to the user service
const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions', req.body);
const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions');
res.json(wikiResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
console.error(error);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7259;http://localhost:5276"
"applicationUrl": "http://localhost:7259;http://localhost:5276"
},
"IIS Express": {
"commandName": "IISExpress",
Expand Down

0 comments on commit aa39078

Please sign in to comment.