diff --git a/app/config/collections2.php b/app/config/collections2.php index 018066cc2..bf1f3ad70 100644 --- a/app/config/collections2.php +++ b/app/config/collections2.php @@ -1006,17 +1006,6 @@ $collections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => 'name', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 2048, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => 'runtime', 'type' => Database::VAR_STRING, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index a1aafb210..7cf2a6ace 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -40,7 +40,6 @@ App::post('/v1/functions') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->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('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('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') ->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) ->inject('response') ->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 Utopia\Database\Database $dbForInternal */ @@ -59,7 +58,6 @@ App::post('/v1/functions') 'dateCreated' => time(), 'dateUpdated' => time(), 'status' => 'disabled', - 'name' => $name, 'runtime' => $runtime, 'tag' => '', 'vars' => $vars, diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index 6d5bf8c01..6112970fd 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -23,12 +23,6 @@ class Func extends Model 'example' => new \stdClass, 'array' => false, ]) - ->addRule('name', [ - 'type' => self::TYPE_STRING, - 'description' => 'Function name.', - 'default' => '', - 'example' => 'My Function', - ]) ->addRule('dateCreated', [ 'type' => self::TYPE_INTEGER, 'description' => 'Function creation date in Unix timestamp.',