Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -361,7 +361,11 @@ def notify_boss(name, tel, date, time, pax, email="", event="新訂位"):
|
|
| 361 |
timeout=15
|
| 362 |
)
|
| 363 |
if r.status_code == 200:
|
| 364 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 365 |
else:
|
| 366 |
print(f"❌ notify_boss GAS Email 失敗:HTTP {r.status_code} — {r.text[:200]}")
|
| 367 |
except Exception as e:
|
|
|
|
| 361 |
timeout=15
|
| 362 |
)
|
| 363 |
if r.status_code == 200:
|
| 364 |
+
body = r.json() if r.text.strip().startswith("{") else {}
|
| 365 |
+
if body.get("status") == "error":
|
| 366 |
+
print(f"❌ notify_boss GAS Email 失敗(GAS 錯誤):{body.get('message', r.text[:200])}")
|
| 367 |
+
else:
|
| 368 |
+
print(f"✅ notify_boss GAS Email 成功")
|
| 369 |
else:
|
| 370 |
print(f"❌ notify_boss GAS Email 失敗:HTTP {r.status_code} — {r.text[:200]}")
|
| 371 |
except Exception as e:
|