fix: 将编辑账单接口从 PATCH 改为 POST

- 修改后端路由:POST /api/bills/:id
- 修改前端 API 调用方法为 POST
- 移除临时添加的 CORS 中间件
- 解决生产环境 405 Method Not Allowed 问题
This commit is contained in:
clz
2026-01-19 01:27:22 +08:00
parent 654989d3dd
commit 49e3176e6b
3 changed files with 3 additions and 3 deletions

View File

@@ -258,7 +258,7 @@ export interface UpdateBillResponse {
export async function updateBill(id: string, patch: UpdateBillRequest): Promise<UpdateBillResponse> {
const response = await apiFetch(`${API_BASE}/api/bills/${encodeURIComponent(id)}`, {
method: 'PATCH',
method: 'POST',
headers: {
'Content-Type': 'application/json',
},