Merge commit '85e2ad329d89e57be4c094067de48525fe7673e3' into develop
This commit is contained in:
commit
e66153498c
@ -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"
|
||||
)
|
||||
|
@ -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 }))
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user