From 47038f8844559b6bed728e25675b2e73b78b93d1 Mon Sep 17 00:00:00 2001 From: Curry141 <135717077+Daniongithub@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:14:28 +0200 Subject: [PATCH] New variants --- package.json | 2 +- server.js | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 305142c..00bb1be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "start-fermate-api", - "version": "2.1.3", + "version": "2.1.4", "main": "server.js", "scripts": { "start": "node server.js" diff --git a/server.js b/server.js index 8816efb..2652d8b 100644 --- a/server.js +++ b/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"){