fix superadmin settings cache

This commit is contained in:
2026-08-29 23:47:58 +03:30
parent 9f6203075a
commit a8be3d499b
2 changed files with 31 additions and 17 deletions
@@ -103,9 +103,18 @@ class SettingsController extends Controller
}
$count = (int) ($result['count'] ?? 0);
$domain = trim((string) (($result['meta']['domain'] ?? '') ?: ''));
$csp = (string) (($result['items']['customer_special_pricing'] ?? '') ?: '');
$message = "همگام شد ({$count} کلید دسترسی از سوپرادمین)";
if ($domain !== '') {
$message .= " — دامنه: {$domain}";
}
if ($csp !== '') {
$message .= " — قیمت ویژه: {$csp}";
}
return response()->json([
'message' => "همگام شد ({$count} کلید دسترسی از سوپرادمین)",
'message' => $message,
'ok' => true,
'count' => $count,
'items' => $result['items'] ?? [],