上傳檔案到「/」

This commit is contained in:
2025-09-17 15:19:32 +08:00
parent 314474a682
commit 322f9da188
5 changed files with 327 additions and 0 deletions

12
PromptRecord.txt Normal file
View File

@@ -0,0 +1,12 @@
[2024-09-08] 新增 employee_votes API 需求
- ✅ 產生 Flask API 伺服器
- ✅ 使用 DB_connection.txt 連線到 employee_votes 資料表
- ✅ 實作 GET /v1/employee_votes (支援過濾)
- ✅ 實作 GET /v1/employee_votes/<id> (找不到回 404)
- ✅ 實作 POST /v1/employee_votes (JSON 接收, 欄位驗證, 成功回 201)
- ✅ 實作 PATCH /v1/employee_votes/<id> (更新 menu_item_id/is_active, 成功回 200)
- ✅ 實作 DELETE /v1/employee_votes/<id> (成功回 204)
- ✅ 所有寫入使用參數化查詢避免 SQL 注入
- ✅ 統一回應格式 { status, code, message, data }
- ✅ 統一錯誤格式 {status:"error", code, message}
- ✅ 啟用 CORS (允許本機前端)