mirror of
https://github.com/Daniongithub/startfermate-api.git
synced 2025-10-02 11:50:47 +00:00
Added more variations to urban routes.
This commit is contained in:
19
server.js
19
server.js
@@ -44,6 +44,8 @@ app.get('/fermata', async (req, res) => {
|
||||
mezzo = "Non disponibile";
|
||||
}
|
||||
|
||||
//Varianti linee
|
||||
|
||||
if(linea == "Linea 4" && destinazione == "Mirabilandia"){
|
||||
linea = "Linea 4B";
|
||||
}
|
||||
@@ -52,9 +54,26 @@ app.get('/fermata', async (req, res) => {
|
||||
linea = "Linea 4D";
|
||||
}
|
||||
|
||||
if(linea == "Linea 4" && destinazione == "Classe via Liburna"){
|
||||
linea = "Linea 4R";
|
||||
}
|
||||
|
||||
if(linea == "Linea 4" && destinazione == "Classe Romea Vecchia"){
|
||||
linea = "Linea 4R";
|
||||
}
|
||||
|
||||
if(linea == "Linea 1" && destinazione == "Borgo Nuovo"){
|
||||
linea = "Linea 1B";
|
||||
}
|
||||
|
||||
//Linee soppresse a metà
|
||||
|
||||
const linee = ["Linea 1", "Linea 1B", "Linea 2", "Linea 3", "Linea 4", "Linea 4B", "Linea 4D", "Linea 5", "Linea 8", "Linea 18", "Linea 70", "Linea 80"];
|
||||
|
||||
if(linee.includes(linea) && destinazione == "Stazione FS"){
|
||||
linea = linea + "/";
|
||||
}
|
||||
|
||||
results.push({
|
||||
linea,
|
||||
destinazione,
|
||||
|
Reference in New Issue
Block a user