Skip to content

Commit

Permalink
GatewayService changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiollende committed Mar 21, 2024
1 parent d93a981 commit 45fbba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ app.get('/health', (_req, res) => {
app.post('/login', async (req, res) => {
try {
// Forward the login request to the authentication service
const authResponse = await axios.post('/auth/login', req.body);
const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body);
res.json(authResponse.data);
} catch (error) {
console.error(error);
Expand All @@ -34,7 +34,7 @@ app.post('/login', async (req, res) => {
app.post('/adduser', async (req, res) => {
try {
// Forward the add user request to the user service
const userResponse = await axios.post('/user/adduser', req.body);
const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body);
res.json(userResponse.data);
} catch (error) {
console.error(error);
Expand All @@ -44,7 +44,7 @@ app.post('/adduser', async (req, res) => {
app.post('/edituser', async (req, res) => {
try {
// Forward the edit user request to the user service
const userResponse = await axios.post('/user/edituser', req.body);
const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body);
res.json(userResponse.data);
} catch (error) {
console.error(error);
Expand All @@ -55,7 +55,7 @@ app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => {
try {
// Forward the edit user request to the user service
console.log(process.env.WIKIDATA_SERVICE_URL);
const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions');
const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions');
res.json(wikiResponse.data);
} catch (error) {
console.error(error);
Expand Down

0 comments on commit 45fbba8

Please sign in to comment.