mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Hotfix: złe przekierowanie ze ścieżki /trains do 404
This commit is contained in:
@@ -12,6 +12,8 @@ exports.scheduledUpdate = functions.pubsub
|
||||
let stationData: {
|
||||
stationName: string;
|
||||
dispatcherName: string;
|
||||
isOnline: boolean;
|
||||
region: string;
|
||||
}[];
|
||||
|
||||
try {
|
||||
@@ -52,9 +54,9 @@ exports.scheduledUpdate = functions.pubsub
|
||||
const docData = doc.data();
|
||||
const docRef = historyRef.doc(doc.id);
|
||||
|
||||
const APIStationData = stationData.find(
|
||||
(station) => station.stationName == doc.id
|
||||
);
|
||||
const APIStationData = stationData
|
||||
.filter((station) => station.isOnline && station.region === "eu")
|
||||
.find((station) => station.stationName == doc.id);
|
||||
|
||||
if (docData.currentDispatcherName != "") {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user