1
0
Fork 0
mirror of synced 2024-09-20 11:37:45 +12:00

get project db key by region

This commit is contained in:
shimon 2024-07-30 18:35:44 +03:00
parent 6d961d0789
commit 998a017781

View file

@ -119,6 +119,11 @@ App::post('/v1/projects')
if ($index !== false) {
$dsn = $databases[$index];
} else {
$databases = array_filter($databases, function($value, $region) {
return str_contains($value, $region);
});
$dsn = $databases[array_rand($databases)];
}