mirror of
https://github.com/Daniongithub/startfermate-api.git
synced 2025-10-02 09:30:48 +00:00
New variants
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "start-fermate-api",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "node server.js"
|
||||
|
24
server.js
24
server.js
@@ -5,7 +5,7 @@ const cors = require('cors');
|
||||
|
||||
const app = express();
|
||||
const port = 3005;
|
||||
const version = "2.1.3";
|
||||
const version = "2.1.4";
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
@@ -48,28 +48,36 @@ app.get('/fermata', async (req, res) => {
|
||||
|
||||
//Varianti linee
|
||||
|
||||
if(linea == "1" && destinazione == "Borgo Nuovo"){
|
||||
linea = "1B";
|
||||
}
|
||||
|
||||
if(linea == "4" && destinazione == "Mirabilandia"){
|
||||
linea = "4B";
|
||||
}
|
||||
|
||||
if(linea == "4" && (destinazione == "Classe Cantoniera" || destinazione == "ClasseCantoniera")){
|
||||
linea = "4C";
|
||||
}
|
||||
|
||||
if(linea == "4" && destinazione == "Lido di Dante"){
|
||||
linea = "4D";
|
||||
}
|
||||
|
||||
if(linea == "4" && destinazione == "Classe via Liburna"){
|
||||
if(linea == "4" && (destinazione == "Classe via Liburna" || "Classe Romea Vecchia")){
|
||||
linea = "4R";
|
||||
}
|
||||
|
||||
if(linea == "4" && destinazione == "Classe Romea Vecchia"){
|
||||
linea = "4R";
|
||||
//Linee limitate o soppresse a metà
|
||||
|
||||
if(linea == "8" && destinazione == "Deposito"){
|
||||
linea = "8/";
|
||||
}
|
||||
|
||||
if(linea == "1" && destinazione == "Borgo Nuovo"){
|
||||
linea = "1B";
|
||||
if(linea == "3" && destinazione == "via Sant'Alberto"){
|
||||
linea = "3/";
|
||||
}
|
||||
|
||||
//Linee soppresse a metà
|
||||
|
||||
const linee = ["1", "1B", "3", "4", "4B", "4D", "5", "8", "18", "70", "80"];
|
||||
|
||||
if(linee.includes(linea) && destinazione == "Stazione FS"){
|
||||
|
Reference in New Issue
Block a user