This commit is contained in:
Jake Barnby committed 2024-11-26 18:29:10 +13:00
1 parent ea0a5a186c
commit ddb86127b7
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ App::post('/v1/projects')
$databaseKeys = System::getEnv('_APP_DATABASE_KEYS', '');
$keys = explode(',', $databaseKeys);
$databases = array_filter($keys, function ($value) use ($region) {
return str_contains($value, $region);
return str_contains($value, $region);
});
}
+1 -1
View File
@@ -1334,7 +1334,7 @@ App::setResource('project', function ($dbForConsole, $request, $console) {
$project = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $projectId));
if($project->getAttribute('region') !== System::getEnv('_APP_REGION')){
if ($project->getAttribute('region') !== System::getEnv('_APP_REGION')) {
throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, 'Project is not accessible in this region. Please make sure you are using the correct endpoint');
}