diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 5b01e3e..241eec9 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -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); } }); @@ -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); } }); @@ -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); } }); diff --git a/wikidata_service/WikiDataTest/Properties/launchSettings.json b/wikidata_service/WikiDataTest/Properties/launchSettings.json index ecc521d..730a8b3 100644 --- a/wikidata_service/WikiDataTest/Properties/launchSettings.json +++ b/wikidata_service/WikiDataTest/Properties/launchSettings.json @@ -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",