adasd
This commit is contained in:
@@ -856,6 +856,9 @@ class ApiKernel
|
||||
case 'account.bridge.test':
|
||||
$this->handleAccountBridgeTest();
|
||||
break;
|
||||
case 'placeholders.status':
|
||||
$this->handlePlaceholderStatus();
|
||||
break;
|
||||
case 'placeholders.schema':
|
||||
$this->handlePlaceholderSchema();
|
||||
break;
|
||||
@@ -1257,6 +1260,20 @@ class ApiKernel
|
||||
]);
|
||||
}
|
||||
|
||||
private function handlePlaceholderStatus(): void
|
||||
{
|
||||
$user = $this->authService->requireAuth();
|
||||
$customerId = (int)($user['customer_id'] ?? 0);
|
||||
$bridge = $this->resolveBridgeConfig($customerId);
|
||||
$url = trim((string)($bridge['url'] ?? ''));
|
||||
$token = trim((string)($bridge['token'] ?? ''));
|
||||
$available = ($url !== '' && $token !== '');
|
||||
$this->respond([
|
||||
'ok' => true,
|
||||
'available' => $available,
|
||||
]);
|
||||
}
|
||||
|
||||
private function fetchPlaceholderSchema(string $url, string $token, int $ttl): array
|
||||
{
|
||||
$cacheFile = $this->placeholderCachePath($url, $token);
|
||||
|
||||
Reference in New Issue
Block a user