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:
+6
-4
@@ -2,10 +2,12 @@
|
|||||||
"hosting": {
|
"hosting": {
|
||||||
"public": "dist",
|
"public": "dist",
|
||||||
"site": "stacjownik-td2",
|
"site": "stacjownik-td2",
|
||||||
"ignore": [
|
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
|
||||||
"firebase.json",
|
"rewrites": [
|
||||||
"**/.*",
|
{
|
||||||
"**/node_modules/**"
|
"source": "**",
|
||||||
|
"destination": "/index.html"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"functions": {
|
"functions": {
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ exports.scheduledUpdate = functions.pubsub
|
|||||||
let stationData: {
|
let stationData: {
|
||||||
stationName: string;
|
stationName: string;
|
||||||
dispatcherName: string;
|
dispatcherName: string;
|
||||||
|
isOnline: boolean;
|
||||||
|
region: string;
|
||||||
}[];
|
}[];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -52,9 +54,9 @@ exports.scheduledUpdate = functions.pubsub
|
|||||||
const docData = doc.data();
|
const docData = doc.data();
|
||||||
const docRef = historyRef.doc(doc.id);
|
const docRef = historyRef.doc(doc.id);
|
||||||
|
|
||||||
const APIStationData = stationData.find(
|
const APIStationData = stationData
|
||||||
(station) => station.stationName == doc.id
|
.filter((station) => station.isOnline && station.region === "eu")
|
||||||
);
|
.find((station) => station.stationName == doc.id);
|
||||||
|
|
||||||
if (docData.currentDispatcherName != "") {
|
if (docData.currentDispatcherName != "") {
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
publicPath: process.env.NODE_ENV === "production" ? "/dist" : "/",
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user