se modifica endpoint, id_linea ahora no es numerico

develop/frontend
Francisco Sandoval 2023-12-02 21:05:59 -03:00
parent b61e60cf64
commit 2198f9a818
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export async function deleteLinea(id) {
} }
export async function getParaderosLinea(id_linea) { export async function getParaderosLinea(id_linea) {
const res = await fetch(`${base}/lineas/${id_linea}/paraderos`, { const res = await fetch(`${base}/lineas/paraderos?id_linea=${id_linea}`, {
headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" }
}) })
if (!res.ok) throw await res.text() if (!res.ok) throw await res.text()
@ -56,7 +56,7 @@ export async function getParaderosLinea(id_linea) {
} }
export async function getBusesLinea(id_linea) { export async function getBusesLinea(id_linea) {
const res = await fetch(`${base}/lineas/${id_linea}/buses`, { const res = await fetch(`${base}/lineas/buses?id_linea=${id_linea}`, {
headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" }
}) })
if (!res.ok) throw await res.text() if (!res.ok) throw await res.text()