umarley / seteAPI

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Erro ao atualizar shape de uma rota de um dado município (via PUT) #39

Closed marcosroriz closed 2 years ago

marcosroriz commented 2 years ago

Umarley,

A API está retornando o seguinte erro ao tentar atualizar o shape de uma rota de um município via PUT. Erro:

SQLSTATE[42703]: Undefined column: 7 ERROR: column "id_escola" does not exist
LINE 1: ..."5201405"}' WHERE "codigo_cidade" = '5201405' AND "id_escola...
^

Requisição: PUT https://sete.transportesufg.eng.br/rotas/5201405/9/shape

Corpo:

{
    "type": "FeatureCollection",
    "id_rota": 9,
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        -5474389.921006995,
                        -1902627.2729023115
                    ],
                    [
                        -5474423.983128329,
                        -1902638.02936168
                    ],
                    [
                        -5474487.087689956,
                        -1902761.0115471215
                    ],
                    [
                        -5474515.771581606,
                        -1902834.155470826
                    ],
                    [
                        -5474751.696590415,
                        -1902826.984497913
                    ],
                    [
                        -5474880.774102834,
                        -1902827.7015952046
                    ],
                    [
                        -5475060.765522927,
                        -1902822.681914166
                    ],
                    [
                        -5475122.435889972,
                        -1902832.004178952
                    ],
                    [
                        -5475640.180134228,
                        -1903062.192409432
                    ],
                    [
                        -5475736.988268542,
                        -1903099.4814685744
                    ],
                    [
                        -5476219.594745527,
                        -1902998.370750514
                    ],
                    [
                        -5476289.153182776,
                        -1902984.7459019828
                    ],
                    [
                        -5476522.926899711,
                        -1902970.4039561586
                    ],
                    [
                        -5477070.789230198,
                        -1902948.8910374222
                    ],
                    [
                        -5477310.299725463,
                        -1902945.3055509645
                    ],
                    [
                        -5477643.032868586,
                        -1902952.476523877
                    ],
                    [
                        -5478156.474529093,
                        -1902803.3202873047
                    ],
                    [
                        -5478407.45858102,
                        -1902614.7236997152
                    ],
                    [
                        -5478487.056380345,
                        -1902393.1406367305
                    ],
                    [
                        -5478645.534881701,
                        -1902153.630141467
                    ]
                ]
            },
            "properties": null
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        -5478645.534881701,
                        -1902153.630141467
                    ],
                    [
                        -5478723.247911857,
                        -1902039.0083851747
                    ],
                    [
                        -5478872.020347378,
                        -1902102.50881497
                    ],
                    [
                        -5478737.7622958105,
                        -1902026.3082992155
                    ],
                    [
                        -5478806.705619592,
                        -1901922.8933135488
                    ]
                ]
            },
            "properties": {
                "estilo": "Pavimentada"
            }
        }
    ]
}
umarley commented 2 years ago

@marcosroriz verificado aqui que o end point está funcionando corretamente.

image

image