|
|
@@ -138,7 +138,7 @@ const Areas: React.FC = () => {
|
|
|
const deleteArea = useMutation({
|
|
|
mutationFn: async (id: string) => {
|
|
|
const res = await areaClient[':id'].$delete({ param: { id } });
|
|
|
- if (res.status !== 200) {
|
|
|
+ if (res.status !== 204) {
|
|
|
throw new Error('删除区域失败');
|
|
|
}
|
|
|
return res.json();
|