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('');