remove name from function
This commit is contained in:
parent
be3eda31f4
commit
e06701942c
3 changed files with 1 additions and 20 deletions
|
@ -1006,17 +1006,6 @@ $collections = [
|
||||||
'array' => false,
|
'array' => false,
|
||||||
'filters' => [],
|
'filters' => [],
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'$id' => 'name',
|
|
||||||
'type' => Database::VAR_STRING,
|
|
||||||
'format' => '',
|
|
||||||
'size' => 2048,
|
|
||||||
'signed' => true,
|
|
||||||
'required' => false,
|
|
||||||
'default' => null,
|
|
||||||
'array' => false,
|
|
||||||
'filters' => [],
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'$id' => 'runtime',
|
'$id' => 'runtime',
|
||||||
'type' => Database::VAR_STRING,
|
'type' => Database::VAR_STRING,
|
||||||
|
|
|
@ -40,7 +40,6 @@ App::post('/v1/functions')
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_FUNCTION)
|
->label('sdk.response.model', Response::MODEL_FUNCTION)
|
||||||
->param('functionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, and underscore. Can\'t start with a leading underscore. Max length is 36 chars.')
|
->param('functionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, and underscore. Can\'t start with a leading underscore. Max length is 36 chars.')
|
||||||
->param('name', '', new Text(128), 'Function name. Max length: 128 chars.')
|
|
||||||
->param('execute', [], new ArrayList(new Text(64)), 'An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
->param('execute', [], new ArrayList(new Text(64)), 'An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||||
->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.')
|
->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.')
|
||||||
->param('vars', [], new Assoc(), 'Key-value JSON object.', true)
|
->param('vars', [], new Assoc(), 'Key-value JSON object.', true)
|
||||||
|
@ -49,7 +48,7 @@ App::post('/v1/functions')
|
||||||
->param('timeout', 15, new Range(1, 900), 'Function maximum execution time in seconds.', true)
|
->param('timeout', 15, new Range(1, 900), 'Function maximum execution time in seconds.', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
->action(function ($functionId, $name, $execute, $runtime, $vars, $events, $schedule, $timeout, $response, $dbForInternal) {
|
->action(function ($functionId, $execute, $runtime, $vars, $events, $schedule, $timeout, $response, $dbForInternal) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal */
|
/** @var Utopia\Database\Database $dbForInternal */
|
||||||
|
|
||||||
|
@ -59,7 +58,6 @@ App::post('/v1/functions')
|
||||||
'dateCreated' => time(),
|
'dateCreated' => time(),
|
||||||
'dateUpdated' => time(),
|
'dateUpdated' => time(),
|
||||||
'status' => 'disabled',
|
'status' => 'disabled',
|
||||||
'name' => $name,
|
|
||||||
'runtime' => $runtime,
|
'runtime' => $runtime,
|
||||||
'tag' => '',
|
'tag' => '',
|
||||||
'vars' => $vars,
|
'vars' => $vars,
|
||||||
|
|
|
@ -23,12 +23,6 @@ class Func extends Model
|
||||||
'example' => new \stdClass,
|
'example' => new \stdClass,
|
||||||
'array' => false,
|
'array' => false,
|
||||||
])
|
])
|
||||||
->addRule('name', [
|
|
||||||
'type' => self::TYPE_STRING,
|
|
||||||
'description' => 'Function name.',
|
|
||||||
'default' => '',
|
|
||||||
'example' => 'My Function',
|
|
||||||
])
|
|
||||||
->addRule('dateCreated', [
|
->addRule('dateCreated', [
|
||||||
'type' => self::TYPE_INTEGER,
|
'type' => self::TYPE_INTEGER,
|
||||||
'description' => 'Function creation date in Unix timestamp.',
|
'description' => 'Function creation date in Unix timestamp.',
|
||||||
|
|
Loading…
Reference in a new issue