allTrainDiagramのアドレス指定ミスを修正

This commit is contained in:
harukin-expo-dev-env 2024-04-18 03:31:33 +00:00
parent fd4e90df2d
commit 5d711d3755
2 changed files with 4 additions and 3 deletions

View File

@ -15,12 +15,11 @@ export const AllTrainDiagramProvider = ({ children }) => {
const customData = {};
useEffect(() => {
fetch(
"http://n8n.haruk.in/webhook/CrowdTh%E2%82%AC71m3Ra7!ngLead%E2%82%ACr$"
"https://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);
@ -33,7 +32,8 @@ export const AllTrainDiagramProvider = ({ children }) => {
setAllTrainDiagram(res);
})
.catch((d) => {
alert("error");
alert("allTrainDiagram取得エラー/再取得します");
alert(d);
fetch(
"https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec"
)

View File

@ -38,6 +38,7 @@ export const CurrentTrainProvider = ({ children }) => {
setCurrentTrainLoading("success");
})
.catch(() => {
alert("現在の全在線列車取得エラー/再取得します");
fetch(
"https://script.google.com/macros/s/AKfycby9Y2-Bm75J_WkbZimi7iS8v5r9wMa9wtzpdwES9sOGF4i6HIYEJOM60W6gM1gXzt1o/exec",
HeaderConfig