Ken hai 2 días
pai
achega
c6fe644ade
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Http/Controllers/admin/Keyboard.php

+ 2 - 2
app/Http/Controllers/admin/Keyboard.php

@@ -120,9 +120,9 @@ class Keyboard extends Controller
         // 示例:通过 ID 删除回复
         $info = KeyboardService::findOne(['id' => $id]);
         if (!$info) {
-            return $this->error(0, '数据不存在');
+            return $this->error(HttpStatus::CUSTOM_ERROR, '数据不存在');
         }
-        if($info->group_id !=1)  return $this->error(0, '系统配置禁止删除');
+        if ($info->group_id != 1) return $this->error(HttpStatus::CUSTOM_ERROR, '系统配置禁止删除');
         $info->delete();
         return $this->success([], '删除成功');
     }