Browse Source

namerule和customfile分组返回格式

kely 11 months ago
parent
commit
5a076a24e9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/Http/Controllers/API/CustomFieldController.php

+ 3 - 2
app/Http/Controllers/API/CustomFieldController.php

@@ -53,15 +53,16 @@ class CustomFieldController extends Controller
         $nameRuleGroups=NamingRule::query()->get()->pluck('id')->toArray();
         $allGroups=config("custom-field.groups");
 
+
         if(!empty($nameRuleGroups)){
             $notNameRule=array_diff($allGroups,$nameRuleGroups);
             return $this->success([
-                $notNameRule
+                'data' => $notNameRule
             ]);
         }
 
         return $this->success([
-            $allGroups
+            'data'=> $allGroups
         ]);
     }