Add LINE push integration and target mode config

This commit is contained in:
2026-04-15 16:22:19 +08:00
parent 1687223631
commit 2bed4f6df0
5 changed files with 256 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
- 若指定日期已經有資料,上傳前會先詢問是否覆蓋
- 可讀取指定日期的資料庫內容並回填到畫面
- 若指定日期沒有資料,畫面會顯示「指定日期沒有資料」
- 組隊結果產生後可一鍵主動推播到指定 LINE 對話
- 支援換行、半形逗號、全形逗號與頓號輸入
- 會自動去除空白與重複名稱
@@ -30,6 +31,14 @@ npm run dev
http://localhost:3500
```
推播到 LINE 時,會直接使用 Flex Message 主動送到指定對話,格式參考既有 `line-bot-ts` 羽球查詢結果樣式。
LINE 推播目標支援分成兩組:
- `LINE_TARGET_ID_LOCAL`: 本地測試用對話
- `LINE_TARGET_ID_PROD`: 正式環境用對話
- `LINE_TARGET_MODE`: `local``prod`
## 資料庫欄位
- `time`: 目標日期,格式為 `YYYYMMDD`