fix: 将编辑账单接口从 PATCH 改为 POST
- 修改后端路由:POST /api/bills/:id - 修改前端 API 调用方法为 POST - 移除临时添加的 CORS 中间件 - 解决生产环境 405 Method Not Allowed 问题
This commit is contained in:
@@ -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',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user