Skip to content

Commit

Permalink
get all groups gateway + postman
Browse files Browse the repository at this point in the history
  • Loading branch information
pelazas committed Apr 3, 2024
1 parent 5710401 commit a0ba292
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
9 changes: 9 additions & 0 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ app.get('/getGroup/:uuid', async (req, res) => {
}
})

app.get('/getGroups', async (req, res) => {
try{
const groupResponse = await axios.get(groupServiceUrl+'/getGroups');
res.json(groupResponse.data);
}catch(error){
res.status(500).json({ error: error.message });
}
})


// Start the gateway service
const server = app.listen(port, () => {
Expand Down
28 changes: 24 additions & 4 deletions gatewayservice/postman/Gateway.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"creatorUUID\": \"445541d7-aa01-46a5-8a08-506ae8609b91\",\r\n \"groupName\": \"Grupo17\",\r\n \"description\": \"grupo tekila oleole\",\r\n \"isPublic\": false\r\n}",
"raw": "{\r\n \"creatorUUID\": \"905aa11b-fd0c-4567-8fe4-e64dac7d96e8\",\r\n \"groupName\": \"GrupoMESSI\",\r\n \"description\": \"grupo tekila oleole\",\r\n \"isPublic\": false\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -105,7 +105,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"uuid\": \"4af4d73c-6d45-47b5-bfc8-5f530e621fa6\",\r\n \"groupName\": \"Grupo 2\",\r\n \"joinCode\": \"ppf4\"\r\n}",
"raw": "{\r\n \"uuid\": \"58cd0585-e578-4f97-bfe9-eacdaee33ddc\",\r\n \"groupName\": \"GrupoMESSI\",\r\n \"joinCode\": \"bxUs\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand All @@ -130,7 +130,19 @@
"name": "Get group",
"request": {
"method": "GET",
"header": []
"header": [],
"url": {
"raw": "http://localhost:8000/getGroup/180e8f22-fc4d-4de4-bfe1-e4c244e3b7dd",
"protocol": "http",
"host": [
"localhost"
],
"port": "8000",
"path": [
"getGroup",
"180e8f22-fc4d-4de4-bfe1-e4c244e3b7dd"
]
}
},
"response": []
},
Expand All @@ -141,7 +153,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"expelledUUID\": \"4af4d73c-6d45-47b5-bfc8-5f530e621fa6\",\r\n \"adminUUID\": \"c77b2bde-1834-49f3-9775-3569eb1e1c6d\",\r\n \"groupName\": \"Grupo 2\"\r\n}",
"raw": "{\r\n \"expelledUUID\": \"58cd0585-e578-4f97-bfe9-eacdaee33ddc\",\r\n \"adminUUID\": \"905aa11b-fd0c-4567-8fe4-e64dac7d96e8\",\r\n \"groupName\": \"GrupoMESSI\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand All @@ -161,6 +173,14 @@
}
},
"response": []
},
{
"name": "Get groups",
"request": {
"method": "GET",
"header": []
},
"response": []
}
]
}

0 comments on commit a0ba292

Please sign in to comment.