Hotfix: złe przekierowanie ze ścieżki /trains do 404

This commit is contained in:
2020-08-16 20:56:34 +02:00
parent 78a8a5402d
commit 1df95e10f4
3 changed files with 14 additions and 7 deletions
+6 -4
View File
@@ -2,10 +2,12 @@
"hosting": {
"public": "dist",
"site": "stacjownik-td2",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"functions": {
+5 -3
View File
@@ -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 (
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/dist" : "/",
};