mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
more fixes introducing name
This commit is contained in:
@@ -263,6 +263,7 @@ 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)
|
||||
@@ -271,7 +272,7 @@ App::put('/v1/functions/:functionId')
|
||||
->inject('response')
|
||||
->inject('dbForInternal')
|
||||
->inject('project')
|
||||
->action(function ($functionId, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project) {
|
||||
->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForInternal */
|
||||
/** @var Utopia\Database\Document $project */
|
||||
@@ -289,6 +290,7 @@ 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,
|
||||
|
||||
@@ -31,10 +31,42 @@
|
||||
<div class="zone xl">
|
||||
<ul class="phases clear" data-ui-phases data-selected="{{router.params.tab}}">
|
||||
<li data-state="/console/users/teams/team?id={{router.params.id}}&project={{router.params.project}}">
|
||||
<h2>Members</h2>
|
||||
<h2>Overview</h2>
|
||||
|
||||
<div class="row responsive margin-top-negative">
|
||||
<div class="col span-8 margin-bottom-large">
|
||||
<label> </label>
|
||||
|
||||
<div class="box margin-bottom-large">
|
||||
<form
|
||||
data-analytics
|
||||
data-analytics-activity
|
||||
data-analytics-event="submit"
|
||||
data-analytics-category="console"
|
||||
data-analytics-label="Update Team"
|
||||
data-service="teams.update"
|
||||
data-scope="sdk"
|
||||
data-event="submit"
|
||||
data-success="alert,trigger"
|
||||
data-success-param-alert-text="Updated team successfully"
|
||||
data-success-param-trigger-events="teams.update"
|
||||
data-failure="alert"
|
||||
data-failure-param-alert-text="Failed to update team"
|
||||
data-failure-param-alert-classname="error">
|
||||
|
||||
<input data-ls-attrs="id=team-id-{{team.$id}}" name="teamId" type="hidden" disabled data-ls-bind="{{team.$id}}" />
|
||||
|
||||
<label for="name">Name</label>
|
||||
<input data-ls-attrs="id=team-name-{{team.$id}}" name="name" type="text" autocomplete="off" data-ls-bind="{{team.name}}" maxlength="128" />
|
||||
|
||||
<hr />
|
||||
|
||||
<button>Update</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h3 class="margin-bottom">Members</h3>
|
||||
|
||||
<div
|
||||
data-service="teams.getMemberships"
|
||||
data-event="load,teams.create,teams.update,teams.delete,teams.deleteMembership,teams.createMembership"
|
||||
|
||||
@@ -31,6 +31,12 @@ class Collection extends Model
|
||||
'example' => 'user:608f9da25e7e1',
|
||||
'array' => true
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Collection name.',
|
||||
'default' => '',
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('attributes', [
|
||||
'type' => Response::MODEL_ATTRIBUTE,
|
||||
'description' => 'Collection attributes.',
|
||||
|
||||
@@ -21,6 +21,12 @@ class Key extends Model
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Key name.',
|
||||
'default' => '',
|
||||
'example' => 'My API Key',
|
||||
])
|
||||
->addRule('scopes', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Allowed permission scopes.',
|
||||
|
||||
@@ -21,6 +21,12 @@ class Platform extends Model
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Platform name.',
|
||||
'default' => '',
|
||||
'example' => 'My Web App',
|
||||
])
|
||||
->addRule('type', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.',
|
||||
|
||||
@@ -27,6 +27,12 @@ class Task extends Model
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Task name.',
|
||||
'default' => '',
|
||||
'example' => 'My Task',
|
||||
])
|
||||
->addRule('security', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Indicated if SSL / TLS Certificate verification is enabled.',
|
||||
|
||||
@@ -16,6 +16,12 @@ class Team extends Model
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Team name.',
|
||||
'default' => '',
|
||||
'example' => 'VIP',
|
||||
])
|
||||
->addRule('dateCreated', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Team creation date in Unix timestamp.',
|
||||
|
||||
@@ -21,6 +21,12 @@ class Webhook extends Model
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Webhook name.',
|
||||
'default' => '',
|
||||
'example' => 'My Webhook',
|
||||
])
|
||||
->addRule('url', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Webhook URL endpoint.',
|
||||
|
||||
Reference in New Issue
Block a user