Merge commit '85e2ad329d89e57be4c094067de48525fe7673e3' into develop

This commit is contained in:
harukin-expo-dev-env 2024-04-18 03:21:17 +00:00
commit e66153498c
2 changed files with 4 additions and 0 deletions

View File

@ -18,7 +18,9 @@ export const AllTrainDiagramProvider = ({ children }) => {
"http://n8n.haruk.in/webhook/CrowdTh%E2%82%AC71m3Ra7!ngLead%E2%82%ACr$"
)
.then((res) => res.json())
.then((res) => res.data)
.then((res) => {
console.log(res);
const data = {};
res.forEach((d) => {
const keys = Object.keys(d);
@ -31,6 +33,7 @@ export const AllTrainDiagramProvider = ({ children }) => {
setAllTrainDiagram(res);
})
.catch((d) => {
alert("error");
fetch(
"https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec"
)

View File

@ -29,6 +29,7 @@ export const CurrentTrainProvider = ({ children }) => {
const getCurrentTrain = () => {
fetch("https://n8n.haruk.in/webhook/c501550c-7d1b-4e50-927b-4429fe18931a")
.then((response) => response.json())
.then((d) => d.data)
.then((d) =>
d.map((x) => ({ num: x.TrainNum, delay: x.delay, Pos: x.Pos }))
)