Browse Source

fix:通知设置数据格式

moell 11 months ago
parent
commit
70e3715ffc
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/Http/Controllers/API/ConfigController.php

+ 4 - 4
app/Http/Controllers/API/ConfigController.php

@@ -78,14 +78,14 @@ class ConfigController extends Controller
                     'name' => __("action-labels.label." . $action->value),
                 ];
 
-                $item['email'] = [
+                $item['email'][] = [
                     ...$actionItem,
-                    'checked' => in_array($action->value, $setting['email'] ?? []),
+                    'checked' => in_array($action->value, $setting[$group]['email'] ?? []),
                 ];
 
-                $item['browser'] = [
+                $item['browser'][] = [
                     ...$actionItem,
-                    'checked' => in_array($action->value, $setting['browser'] ?? []),
+                    'checked' => in_array($action->value, $setting[$group]['browser'] ?? []),
                 ];
             }