IIC2143 / Syllabus

65 stars 2 forks source link

Postman retorna distinto a show=True #89

Closed matias-m6reno closed 3 months ago

matias-m6reno commented 3 months ago

cuando ejecuto GET localhost:3000/matches/Santiago Wanderers en PostMan me retorna lo siguente: [ { "id": 32, "teamA": 20, "teamB": 21, "state": true, "result": "2-2" }, ... etc, se entiende { "id": 37, "teamA": 22, "teamB": 21, "state": false, "result": "--" } ]

Esto, creo, esta correcto, pero cuando uso el show=True me dice que mi return es el siguiente: { "state": true, "result": "0-0", "teamA": { "id": 22, "name": "Deportes Iquique", "stadium": "Cavancha", "capacity": 10000, "city": "Iquique", "created_at": "2024-03-27T17:27:19.574Z", "updated_at": "2024-03-27T17:27:19.574Z" }, "teamB": { "id": 20, "name": "Everton", "stadium": "Sausalito", "capacity": 22000, "city": "Vi\u00f1a del Mar", "created_at": "2024-03-27T17:27:19.553Z", "updated_at": "2024-03-27T17:27:19.553Z" } } ... etc ... { "state": true, "result": "5-6", "teamA": { "id": 21, "name": "Santiago Wanderers", "stadium": "El\u00edas Figueroa Brander", "capacity": 18000, "city": "Valpara\u00edso", "created_at": "2024-03-27T17:27:19.563Z", "updated_at": "2024-03-27T17:27:19.563Z" }, "teamB": { "id": 22, "name": "Deportes Iquique", "stadium": "Cavancha", "capacity": 10000, "city": "Iquique", "created_at": "2024-03-27T17:27:19.574Z", "updated_at": "2024-03-27T17:27:19.574Z" } }

Ya cree un comando que crea un json custom para que no retorne el objeto y solo el id, pero por alguna razón recibo resultados distintos.