mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
AI comments fixes
This commit is contained in:
@@ -9,13 +9,13 @@ use Appwrite\Platform\Modules\Core;
|
||||
use Appwrite\Platform\Modules\Databases;
|
||||
use Appwrite\Platform\Modules\Functions;
|
||||
use Appwrite\Platform\Modules\Health;
|
||||
use Appwrite\Platform\Modules\Project;
|
||||
use Appwrite\Platform\Modules\Projects;
|
||||
use Appwrite\Platform\Modules\Proxy;
|
||||
use Appwrite\Platform\Modules\Sites;
|
||||
use Appwrite\Platform\Modules\Storage;
|
||||
use Appwrite\Platform\Modules\Teams;
|
||||
use Appwrite\Platform\Modules\Tokens;
|
||||
use Appwrite\Platform\Modules\Variables;
|
||||
use Appwrite\Platform\Modules\VCS;
|
||||
use Appwrite\Platform\Modules\Webhooks;
|
||||
use Utopia\Platform\Platform;
|
||||
@@ -39,6 +39,6 @@ class Appwrite extends Platform
|
||||
$this->addModule(new Storage\Module());
|
||||
$this->addModule(new VCS\Module());
|
||||
$this->addModule(new Webhooks\Module());
|
||||
$this->addModule(new Variables\Module());
|
||||
$this->addModule(new Project\Module());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class Create extends Base
|
||||
group: 'variables',
|
||||
name: 'createVariable',
|
||||
description: <<<EOT
|
||||
Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
||||
Create a new project environment variable. These variables can be accessed by all functions and sites in the project.
|
||||
EOT,
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
@@ -95,7 +95,7 @@ class Create extends Base
|
||||
|
||||
foreach (['functions', 'sites'] as $collection) {
|
||||
$dbForProject->updateDocuments($collection, new Document([
|
||||
'live', 'false'
|
||||
'live' => 'false'
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class Delete extends Base
|
||||
|
||||
foreach (['functions', 'sites'] as $collection) {
|
||||
$dbForProject->updateDocuments($collection, new Document([
|
||||
'live', 'false'
|
||||
'live' => 'false'
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ class Update extends Base
|
||||
throw new Exception(Exception::VARIABLE_NOT_FOUND);
|
||||
}
|
||||
|
||||
$isSeretVariable = $variable->getAttribute('secret', false) === true;
|
||||
if ($isSeretVariable && $secret === false) {
|
||||
$isSecretVariable = $variable->getAttribute('secret', false) === true;
|
||||
if ($isSecretVariable && $secret === false) {
|
||||
throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET);
|
||||
}
|
||||
|
||||
@@ -99,14 +99,14 @@ class Update extends Base
|
||||
}
|
||||
|
||||
try {
|
||||
$dbForProject->updateDocument('variables', $variable->getId(), $updates);
|
||||
$variable = $dbForProject->updateDocument('variables', $variable->getId(), $updates);
|
||||
} catch (Duplicate $th) {
|
||||
throw new Exception(Exception::VARIABLE_ALREADY_EXISTS);
|
||||
}
|
||||
|
||||
foreach (['functions', 'sites'] as $collection) {
|
||||
$dbForProject->updateDocuments($collection, new Document([
|
||||
'live', 'false'
|
||||
'live' => 'false'
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class XList extends Base
|
||||
group: 'variables',
|
||||
name: 'listVariables',
|
||||
description: <<<EOT
|
||||
Get a list of all variables of a specific function.
|
||||
Get a list of all project environment variables.
|
||||
EOT,
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
|
||||
Reference in New Issue
Block a user