fix(settings): read SuperAdmin overlay via ConfigService everywhere

This commit is contained in:
2026-08-22 15:10:54 +03:30
parent 197b49b719
commit 7bdb2c91a0
9 changed files with 31 additions and 35 deletions
+5 -5
View File
@@ -2,7 +2,6 @@
namespace App\Services;
use App\Http\Controllers\Controller;
use App\Models\Setting;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
@@ -21,8 +20,9 @@ class ChatWebhookService
public function ensureRegisteredDetailed(int $maxAttempts = 3): array
{
$webhookUrl = $this->webhookUrl();
$chatApi = Controller::Config('chat_api');
$chatApiKey = Controller::Config('chat_api_key');
$config = app(ConfigService::class);
$chatApi = $config->getString('chat_api');
$chatApiKey = $config->getString('chat_api_key');
if (! $chatApi || ! $chatApiKey) {
return [
@@ -128,7 +128,7 @@ class ChatWebhookService
*/
public function webhookUrl(): string
{
$base = trim((string) Controller::Config('chat_webhook_base_url'));
$base = trim(app(ConfigService::class)->getString('chat_webhook_base_url'));
if ($base === '' || $base === '0' || strtolower($base) === 'false') {
$base = rtrim((string) config('app.url'), '/');
} else {
@@ -154,7 +154,7 @@ class ChatWebhookService
public function ensureSecret(): string
{
$existing = $this->sanitizeSecret((string) Controller::Config('chat_webhook_secret'));
$existing = $this->sanitizeSecret(app(ConfigService::class)->getString('chat_webhook_secret'));
if ($existing !== '') {
return $existing;
}