From 2730df419554c1504f3a5410f079c3816e95b63a Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 20 May 2026 22:15:54 +0800 Subject: [PATCH] auto-sync: 2026-05-20 22:15:54 --- src/frontend/src/components/EdictBoard.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/EdictBoard.tsx b/src/frontend/src/components/EdictBoard.tsx index 23a84eb..a299f45 100644 --- a/src/frontend/src/components/EdictBoard.tsx +++ b/src/frontend/src/components/EdictBoard.tsx @@ -346,9 +346,15 @@ export default function EdictBoard() { if (!showProjectConfirm) return; const { id, action } = showProjectConfirm; try { - const res = await fetch(`/api/projects/${id}/${action === 'archive' ? 'archive' : ''}`, { + const res = await fetch(`/api/projects/${id}`, { method: action === 'archive' ? 'POST' : 'DELETE', + ...(action === 'archive' ? {} : {}), }); + if (action === 'archive') { + // archive 走专用端点 + const res2 = await fetch(`/api/projects/${id}/archive`, { method: 'POST' }); + if (!res2.ok) { toast('归档失败', 'err'); return; } + } if (res.ok) { toast(action === 'archive' ? `📦 已归档 ${id}` : `🗑️ 已删除 ${id}`); setSelectedProjectId('');