mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix ping 5xx error
This commit is contained in:
@@ -14,6 +14,7 @@ use Appwrite\Extend\Exception as AppwriteException;
|
||||
use Appwrite\Network\Validator\Origin;
|
||||
use Appwrite\Platform\Appwrite;
|
||||
use Appwrite\SDK\Method;
|
||||
use Appwrite\SDK\Response as SDKResponse;
|
||||
use Appwrite\Transformation\Adapter\Preview;
|
||||
use Appwrite\Transformation\Transformation;
|
||||
use Appwrite\Utopia\Request;
|
||||
@@ -1324,6 +1325,21 @@ App::get('/v1/ping')
|
||||
->desc('Test the connection between the Appwrite and the SDK.')
|
||||
->label('scope', 'global')
|
||||
->label('event', 'projects.[projectId].ping')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'ping',
|
||||
name: 'get',
|
||||
hide: true,
|
||||
description: <<<EOT
|
||||
Send a ping to project as part of onboarding.
|
||||
EOT,
|
||||
auth: [],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
code: Response::STATUS_CODE_OK,
|
||||
model: Response::MODEL_ANY,
|
||||
)
|
||||
],
|
||||
))
|
||||
->inject('response')
|
||||
->inject('project')
|
||||
->inject('dbForPlatform')
|
||||
|
||||
@@ -36,16 +36,16 @@ class Request extends UtopiaRequest
|
||||
$methods = [$methods];
|
||||
}
|
||||
|
||||
$methods = \array_filter($methods, function ($method) {
|
||||
return !empty($method);
|
||||
});
|
||||
|
||||
$params = [];
|
||||
$endpointIdentifier = 'unknown.unknown';
|
||||
|
||||
foreach ($methods as $method) {
|
||||
/** @var \Appwrite\SDK\Method $method */
|
||||
if (empty($method)) {
|
||||
$endpointIdentifier = 'unknown.unknown';
|
||||
} else {
|
||||
$endpointIdentifier = $method->getNamespace() . '.' . $method->getMethodName();
|
||||
}
|
||||
|
||||
$endpointIdentifier = $method->getNamespace() . '.' . $method->getMethodName();
|
||||
$params += $method->getParameters();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user