remove name on update
This commit is contained in:
parent
40b57aca19
commit
f957c4aa94
|
@ -261,7 +261,6 @@ App::put('/v1/functions/:functionId')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_FUNCTION)
|
||||
->param('functionId', '', new UID(), 'Function unique ID.')
|
||||
->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('vars', [], new Assoc(), 'Key-value JSON object.', true)
|
||||
->param('events', [], new ArrayList(new WhiteList(array_keys(Config::getParam('events')), true)), 'Events list.', true)
|
||||
|
@ -270,7 +269,7 @@ App::put('/v1/functions/:functionId')
|
|||
->inject('response')
|
||||
->inject('dbForInternal')
|
||||
->inject('project')
|
||||
->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project) {
|
||||
->action(function ($functionId, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForInternal */
|
||||
/** @var Appwrite\Database\Document $project */
|
||||
|
@ -288,7 +287,6 @@ App::put('/v1/functions/:functionId')
|
|||
$function = $dbForInternal->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [
|
||||
'execute' => $execute,
|
||||
'dateUpdated' => time(),
|
||||
'name' => $name,
|
||||
'vars' => $vars,
|
||||
'events' => $events,
|
||||
'schedule' => $schedule,
|
||||
|
|
|
@ -725,7 +725,7 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId')
|
|||
->param('httpPass', '', new Text(256), 'Webhook HTTP password. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function ($projectId, $webhookId, $name, $events, $url, $security, $httpUser, $httpPass, $response, $dbForConsole) {
|
||||
->action(function ($projectId, $webhookId, $events, $url, $security, $httpUser, $httpPass, $response, $dbForConsole) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForConsole */
|
||||
|
||||
|
@ -744,7 +744,6 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId')
|
|||
}
|
||||
|
||||
$project->findAndReplace('$id', $webhook->getId(), $webhook
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('events', $events)
|
||||
->setAttribute('url', $url)
|
||||
->setAttribute('security', $security)
|
||||
|
@ -903,7 +902,6 @@ App::put('/v1/projects/:projectId/keys/:keyId')
|
|||
->label('sdk.response.model', Response::MODEL_KEY)
|
||||
->param('projectId', null, new UID(), 'Project unique ID.')
|
||||
->param('keyId', null, new UID(), 'Key unique ID.')
|
||||
->param('name', null, new Text(128), 'Key name. Max length: 128 chars.')
|
||||
->param('scopes', null, new ArrayList(new WhiteList(array_keys(Config::getParam('scopes')), true)), 'Key scopes list')
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
|
@ -1110,7 +1108,6 @@ App::put('/v1/projects/:projectId/tasks/:taskId')
|
|||
->label('sdk.response.model', Response::MODEL_TASK)
|
||||
->param('projectId', null, new UID(), 'Project unique ID.')
|
||||
->param('taskId', null, new UID(), 'Task unique ID.')
|
||||
->param('name', null, new Text(128), 'Task name. Max length: 128 chars.')
|
||||
->param('status', null, new WhiteList(['play', 'pause'], true), 'Task status.')
|
||||
->param('schedule', null, new Cron(), 'Task schedule CRON syntax.')
|
||||
->param('security', false, new Boolean(true), 'Certificate verification, false for disabled or true for enabled.')
|
||||
|
@ -1121,7 +1118,7 @@ App::put('/v1/projects/:projectId/tasks/:taskId')
|
|||
->param('httpPass', '', new Text(256), 'Task HTTP password. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function ($projectId, $taskId, $name, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders, $httpUser, $httpPass, $response, $dbForConsole) {
|
||||
->action(function ($projectId, $taskId, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders, $httpUser, $httpPass, $response, $dbForConsole) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForConsole */
|
||||
|
||||
|
@ -1142,7 +1139,6 @@ App::put('/v1/projects/:projectId/tasks/:taskId')
|
|||
$security = ($security === '1' || $security === 'true' || $security === 1 || $security === true);
|
||||
|
||||
$project->findAndReplace('$id', $task->getId(), $task
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('status', $status)
|
||||
->setAttribute('schedule', $schedule)
|
||||
->setAttribute('updated', \time())
|
||||
|
@ -1320,13 +1316,12 @@ App::put('/v1/projects/:projectId/platforms/:platformId')
|
|||
->label('sdk.response.model', Response::MODEL_PLATFORM)
|
||||
->param('projectId', null, new UID(), 'Project unique ID.')
|
||||
->param('platformId', null, new UID(), 'Platform unique ID.')
|
||||
->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.')
|
||||
->param('key', '', new Text(256), 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true)
|
||||
->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true)
|
||||
->param('hostname', '', new Text(256), 'Platform client URL. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function ($projectId, $platformId, $name, $key, $store, $hostname, $response, $dbForConsole) {
|
||||
->action(function ($projectId, $platformId, $key, $store, $hostname, $response, $dbForConsole) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForConsole */
|
||||
|
||||
|
@ -1343,7 +1338,6 @@ App::put('/v1/projects/:projectId/platforms/:platformId')
|
|||
}
|
||||
|
||||
$platform
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('dateUpdated', \time())
|
||||
->setAttribute('key', $key)
|
||||
->setAttribute('store', $store)
|
||||
|
@ -1351,7 +1345,6 @@ App::put('/v1/projects/:projectId/platforms/:platformId')
|
|||
;
|
||||
|
||||
$project->findAndReplace('$id', $platform->getId(), $platform
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('dateUpdated', \time())
|
||||
->setAttribute('key', $key)
|
||||
->setAttribute('store', $store)
|
||||
|
|
Loading…
Reference in a new issue