review: addressing
This commit is contained in:
parent
8e145a9519
commit
439e42e1ab
5 changed files with 6 additions and 18 deletions
|
@ -731,9 +731,8 @@ Http::error()
|
|||
Console::error('[Error] File: ' . $file);
|
||||
Console::error('[Error] Line: ' . $line);
|
||||
}
|
||||
|
||||
switch ($class) {
|
||||
case 'Utopia\Servers\Exception':
|
||||
case 'Utopia\Http\Exception':
|
||||
$error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error);
|
||||
switch ($code) {
|
||||
case 400:
|
||||
|
@ -958,7 +957,7 @@ Http::get('/humans.txt')
|
|||
->inject('geodb')
|
||||
->inject('route')
|
||||
->inject('authorization')
|
||||
->action(function (Request $request, Response $response, Database $dbForConsole, callable $getProjectDB, Event $queueForEvents, Usage $queueForUsage, Reader $geodb, ?Route $route, Authorization $authorization) {
|
||||
->action(function (Request $request, Response $response, Database $dbForConsole, callable $getProjectDB, Event $queueForEvents, Usage $queueForUsage, Reader $geodb, Route $route, Authorization $authorization) {
|
||||
$host = $request->getHostname() ?? '';
|
||||
$mainDomain = System::getEnv('_APP_DOMAIN', '');
|
||||
|
||||
|
@ -966,9 +965,6 @@ Http::get('/humans.txt')
|
|||
$template = new View(__DIR__ . '/../views/general/humans.phtml');
|
||||
$response->text($template->render(false));
|
||||
} else {
|
||||
if (is_null($route)) {
|
||||
$route = new Route($request->getMethod(), $request->getURI());
|
||||
}
|
||||
router($dbForConsole, $getProjectDB, $request, $response, $route, $queueForEvents, $queueForUsage, $geodb, $authorization);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -307,7 +307,7 @@ $registry->set(
|
|||
];
|
||||
|
||||
$pools = [];
|
||||
$poolSize = (int)System::getEnv('_APP_POOL_CLIENTS', 64);
|
||||
$poolSize = (int)System::getEnv('_APP_POOL_SIZE', 64);
|
||||
|
||||
foreach ($connections as $key => $connection) {
|
||||
$dsns = $connection['dsns'] ?? '';
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[mysqld]
|
||||
max_connections=1024
|
|
@ -3,6 +3,7 @@
|
|||
namespace Appwrite\Auth\Validator;
|
||||
|
||||
use Utopia\Http\Validator;
|
||||
use Utopia\Http\Validator\Text;
|
||||
|
||||
/**
|
||||
* MockNumber.
|
||||
|
@ -45,7 +46,7 @@ class MockNumber extends Validator
|
|||
return false;
|
||||
}
|
||||
|
||||
$otp = new Validator\Text(6, 6, Validator\Text::NUMBERS);
|
||||
$otp = new Text(6, 6, Validator\Text::NUMBERS);
|
||||
if (!$otp->isValid($value['otp'])) {
|
||||
$this->message = 'Invalid OTP. Please make sure the OTP is a 6 digit number';
|
||||
return false;
|
||||
|
|
|
@ -2868,14 +2868,7 @@ trait DatabasesBase
|
|||
$this->assertEquals('Invalid document structure: Attribute "floatRange" has invalid format. Value must be a valid range between 1 and 1', $badFloatRange['body']['message']);
|
||||
$this->assertEquals('Invalid document structure: Attribute "probability" has invalid format. Value must be a valid range between 0 and 1', $badProbability['body']['message']);
|
||||
$this->assertEquals('Invalid document structure: Attribute "upperBound" has invalid format. Value must be a valid range between -9,223,372,036,854,775,808 and 10', $tooHigh['body']['message']);
|
||||
|
||||
$max = '9,223,372,036,854,775,807';
|
||||
|
||||
if (PHP_VERSION_ID < 80300) {
|
||||
$max = '9,223,372,036,854,775,808';
|
||||
}
|
||||
|
||||
$this->assertEquals('Invalid document structure: Attribute "lowerBound" has invalid format. Value must be a valid range between 5 and '.$max, $tooLow['body']['message']);
|
||||
$this->assertEquals('Invalid document structure: Attribute "lowerBound" has invalid format. Value must be a valid range between 5 and '.\number_format(PHP_INT_MAX), $tooLow['body']['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue