From 48f892c0a8b2e4bb4cb0ce2b7dd60cb43ebd8071 Mon Sep 17 00:00:00 2001 From: Curry141 <135717077+Daniongithub@users.noreply.github.com> Date: Mon, 15 Sep 2025 16:50:22 +0200 Subject: [PATCH] New variations with winter timetable. --- package.json | 2 +- server.js | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 09128d6..e5ade45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "start-fermate-api", - "version": "2.1.6", + "version": "2.2", "main": "server.js", "scripts": { "start": "node server.js" diff --git a/server.js b/server.js index 489f8bf..d831f68 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.6"; +const version = "2.2"; app.use(cors()); app.use(express.json()); @@ -41,11 +41,11 @@ app.get('/fermata', async (req, res) => { } if(stato == "Non disp"){ - stato = "Non disponibile"; + stato = "N.D."; } if(mezzo == ""){ - mezzo = "Non disponibile"; + mezzo = "N.D."; } if(destinazione == "Fornace.Zarattini"){ @@ -86,6 +86,15 @@ app.get('/fermata', async (req, res) => { linea = "4R"; } + if(linea == "4" && destinazione == "R.Vecchia"){ + linea = "4R"; + } + + if(linea == "4" && destinazione == "Classe"){ + linea = "4R"; + destinazione = "Classe Piazza"; + } + //Linee limitate o soppresse a metà if(linea == "8" && destinazione == "Deposito"){ @@ -96,12 +105,20 @@ app.get('/fermata', async (req, res) => { linea = "3/"; } + if(linea == "1" && destinazione == "Antica Milizia"){ + linea = "1/"; + } + const linee = ["1", "1B", "3", "4", "4B", "4D", "5", "8", "18", "70", "80"]; if(linee.includes(linea) && destinazione == "Stazione FS"){ linea = linea + "/"; } + if(linee.includes(linea) && destinazione == "STAZIONE FS"){ + linea = linea + "/"; + } + results.push({ linea, destinazione,