ctucx.git: trainsearch

web based trip-planner, fork of https://cyberchaos.dev/yuka/trainsearch

commit a5e86ad024d3adf0e28605470ce7ee0b8d0cf206
parent 7ae6fa92c33ad8b835d1a3f85a69183e65911839
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 12 Mar 2025 10:42:46 +0100

remove VRN backend (because it was shut down)
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/nginx.conf b/nginx.conf
@@ -28,7 +28,6 @@ http {
 		default no;
 		nahsh   nah.sh.hafas.de;
 		rmv     www.rmv.de;
-		vrn     vrn.hafas.de;
 		bvg     bvg-apps-ext.hafas.de;
 		oebb    fahrplan.oebb.at;
 	}

@@ -37,7 +36,6 @@ http {
 		default no;
 		nahsh   '/bin/mgate.exe';
 		rmv     '/auskunft/bin/jp/mgate.exe';
-		vrn     '/bin/mgate.exe';
 		bvg     '/bin/mgate.exe';
 		oebb    '/bin/mgate.exe';
 	}
diff --git a/src/dataStorage.js b/src/dataStorage.js
@@ -89,6 +89,15 @@ class IDBStorage {
 						}
 
 						await transaction.objectStore('settings').put(settings, 'settings');
+
+					case 6:
+						settings = await transaction.objectStore('settings').get('settings');
+
+						if (settings !== undefined && settings.profile === 'vrn') {
+							settings.profile = 'db';
+						}
+
+						await transaction.objectStore('settings').put(settings, 'settings');
 				}
 			}
 		});
diff --git a/src/hafasClient.js b/src/hafasClient.js
@@ -35,11 +35,6 @@ export const getHafasClient = async profileName => {
 				profile = rmvProfile;
 				break;
 
-			case "vrn":
-				const { profile: vrnProfile } = await import('hafas-client/p/vrn/index.js');
-				profile = vrnProfile;
-				break;
-
 			case "oebb":
 				const { profile: oebbProfile } = await import('hafas-client/p/oebb/index.js');
 				profile = oebbProfile;
diff --git a/src/settingsView.js b/src/settingsView.js
@@ -29,7 +29,6 @@ const settingsTemplate = () => html`
 				<option value="db"    ?selected=${settings.profile === 'db'}>DB</option>
 				<option value="nahsh" ?selected=${settings.profile === 'nahsh'}>NAH.SH</option>
 				<option value="rmv"   ?selected=${settings.profile === 'rmv'}>RMV</option>
-				<option value="vrn"   ?selected=${settings.profile === 'vrn'}>VRN</option>
 				<option value="bvg"   ?selected=${settings.profile === 'bvg'}>BVG</option>
 				<option value="oebb"  ?selected=${settings.profile === 'oebb'}>ÖBB</option>
 			</select>
diff --git a/src/shim/cross-fetch.js b/src/shim/cross-fetch.js
@@ -13,7 +13,6 @@ export const fetch = (resource, options) => {
 		'https://app.vendo.noncd.db.de/mob/bahnhofstafel/abfahrt': '/db/vendo/departures',
 		'https://nah.sh.hafas.de/bin/mgate.exe?':                  '/hafas/nahsh',
 		'https://www.rmv.de/auskunft/bin/jp/mgate.exe?':           '/hafas/rmv',
-		'https://vrn.hafas.de/bin/mgate.exe?':                     '/hafas/vrn',
 		'https://bvg-apps-ext.hafas.de/bin/mgate.exe?':            '/hafas/bvg',
 		'https://fahrplan.oebb.at/bin/mgate.exe?':                 '/hafas/oebb',
 	};