mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Shared variables
This commit is contained in:
@@ -7,7 +7,9 @@ use Appwrite\Utopia\Database\Validator\Queries\Base;
|
||||
class Variables extends Base
|
||||
{
|
||||
public const ALLOWED_ATTRIBUTES = [
|
||||
'key'
|
||||
'key',
|
||||
'resourceType',
|
||||
'resourceId'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,7 @@ class Rule extends Model
|
||||
])
|
||||
->addRule('resourceId', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'ID of resource for the action type. If resourceType is "api" or "url", leave empty. If resourceType is "function", provide ID of the function.',
|
||||
'description' => 'ID of resource for the action type. If resourceType is "api" or "url", it is empty. If resourceType is "function", it is ID of the function.',
|
||||
'default' => '',
|
||||
'example' => 'myAwesomeFunction',
|
||||
])
|
||||
|
||||
@@ -41,11 +41,17 @@ class Variable extends Model
|
||||
'default' => '',
|
||||
'example' => 'myPa$$word1',
|
||||
])
|
||||
->addRule('functionId', [
|
||||
->addRule('resourceType', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Function ID.',
|
||||
'description' => 'Service to which the variable belongs. Possible values are "project", "function"',
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
'example' => 'function',
|
||||
])
|
||||
->addRule('resourceId', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'ID of resource to which the variable belongs. If resourceType is "project", it is empty. If resourceType is "function", it is ID of the function.',
|
||||
'default' => '',
|
||||
'example' => 'myAwesomeFunction',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user