Connection problem
This commit is contained in:
parent
cc5ae73f57
commit
4ce312560b
3 changed files with 3 additions and 6 deletions
|
@ -163,7 +163,7 @@ App::post('/v1/account')
|
||||||
]);
|
]);
|
||||||
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
|
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
|
||||||
}
|
}
|
||||||
$dbForProject->delete('users', $user->getId());
|
$dbForProject->delete('users', $user->getId()); // todo: What id going on here>
|
||||||
} catch (Duplicate) {
|
} catch (Duplicate) {
|
||||||
throw new Exception(Exception::USER_ALREADY_EXISTS);
|
throw new Exception(Exception::USER_ALREADY_EXISTS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -798,7 +798,7 @@ $register->set('pools', function () {
|
||||||
PDO::ATTR_TIMEOUT => 3, // Seconds
|
PDO::ATTR_TIMEOUT => 3, // Seconds
|
||||||
PDO::ATTR_PERSISTENT => true,
|
PDO::ATTR_PERSISTENT => true,
|
||||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||||
PDO::ATTR_ERRMODE => App::isDevelopment() ? PDO::ERRMODE_WARNING : PDO::ERRMODE_SILENT, // If in production mode, warnings are not displayed
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT, // Overwrite in PDOProxy
|
||||||
PDO::ATTR_EMULATE_PREPARES => true,
|
PDO::ATTR_EMULATE_PREPARES => true,
|
||||||
PDO::ATTR_STRINGIFY_FETCHES => true
|
PDO::ATTR_STRINGIFY_FETCHES => true
|
||||||
));
|
));
|
||||||
|
@ -820,12 +820,10 @@ $register->set('pools', function () {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Invalid scheme");
|
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Invalid scheme");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$pool = new Pool($name, $poolSize, function () use ($type, $resource, $dsn) {
|
$pool = new Pool($name, $poolSize, function () use ($type, $resource, $dsn) {
|
||||||
// Get Adapter
|
// Get Adapter
|
||||||
$adapter = null;
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'database':
|
case 'database':
|
||||||
$adapter = match ($dsn->getScheme()) {
|
$adapter = match ($dsn->getScheme()) {
|
||||||
|
@ -854,7 +852,6 @@ $register->set('pools', function () {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Server error: Missing adapter implementation.");
|
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Server error: Missing adapter implementation.");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $adapter;
|
return $adapter;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="true"
|
||||||
>
|
>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension class="Appwrite\Tests\TestHook" />
|
<extension class="Appwrite\Tests\TestHook" />
|
||||||
|
|
Loading…
Reference in a new issue