Skip to content

Commit 5f46b24

Browse files
committed
fix for #755
1 parent ab13025 commit 5f46b24

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

api.include.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4871,22 +4871,12 @@ class StatusController
48714871

48724872
public function __construct(Router $router, Responder $responder, Cache $cache, GenericDB $db)
48734873
{
4874-
$router->register('GET', '/status/up', array($this, 'up'));
48754874
$router->register('GET', '/status/ping', array($this, 'ping'));
48764875
$this->db = $db;
48774876
$this->cache = $cache;
48784877
$this->responder = $responder;
48794878
}
48804879

4881-
public function up(ServerRequestInterface $request): ResponseInterface
4882-
{
4883-
$result = [
4884-
'db' => $this->db->ping()<1000000,
4885-
'cache' => $this->cache->ping()<1000000,
4886-
];
4887-
return $this->responder->success($result);
4888-
}
4889-
48904880
public function ping(ServerRequestInterface $request): ResponseInterface
48914881
{
48924882
$result = [
@@ -9717,7 +9707,6 @@ class OpenApiStatusBuilder
97179707
private $openapi;
97189708
private $operations = [
97199709
'status' => [
9720-
'up' => 'get',
97219710
'ping' => 'get',
97229711
],
97239712
];
@@ -9769,11 +9758,6 @@ private function setComponentSchema() /*: void*/
97699758
$this->openapi->set("$prefix|properties|cache|type", 'integer');
97709759
$this->openapi->set("$prefix|properties|cache|format", "int64");
97719760
break;
9772-
case 'up':
9773-
$this->openapi->set("$prefix|required", ['db', 'cache']);
9774-
$this->openapi->set("$prefix|properties|db|type", 'boolean');
9775-
$this->openapi->set("$prefix|properties|cache|type", 'boolean');
9776-
break;
97779761
}
97789762
}
97799763
}

api.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4871,22 +4871,12 @@ class StatusController
48714871

48724872
public function __construct(Router $router, Responder $responder, Cache $cache, GenericDB $db)
48734873
{
4874-
$router->register('GET', '/status/up', array($this, 'up'));
48754874
$router->register('GET', '/status/ping', array($this, 'ping'));
48764875
$this->db = $db;
48774876
$this->cache = $cache;
48784877
$this->responder = $responder;
48794878
}
48804879

4881-
public function up(ServerRequestInterface $request): ResponseInterface
4882-
{
4883-
$result = [
4884-
'db' => $this->db->ping()<1000000,
4885-
'cache' => $this->cache->ping()<1000000,
4886-
];
4887-
return $this->responder->success($result);
4888-
}
4889-
48904880
public function ping(ServerRequestInterface $request): ResponseInterface
48914881
{
48924882
$result = [
@@ -9717,7 +9707,6 @@ class OpenApiStatusBuilder
97179707
private $openapi;
97189708
private $operations = [
97199709
'status' => [
9720-
'up' => 'get',
97219710
'ping' => 'get',
97229711
],
97239712
];
@@ -9769,11 +9758,6 @@ private function setComponentSchema() /*: void*/
97699758
$this->openapi->set("$prefix|properties|cache|type", 'integer');
97709759
$this->openapi->set("$prefix|properties|cache|format", "int64");
97719760
break;
9772-
case 'up':
9773-
$this->openapi->set("$prefix|required", ['db', 'cache']);
9774-
$this->openapi->set("$prefix|properties|db|type", 'boolean');
9775-
$this->openapi->set("$prefix|properties|cache|type", 'boolean');
9776-
break;
97779761
}
97789762
}
97799763
}

0 commit comments

Comments
 (0)