depricate project name
This commit is contained in:
parent
829a804ea5
commit
df6645c9ab
|
@ -23,17 +23,6 @@ $collections = [
|
|||
'array' => false,
|
||||
'filters' => [],
|
||||
],
|
||||
[
|
||||
'$id' => 'name',
|
||||
'type' => Database::VAR_STRING,
|
||||
'format' => '',
|
||||
'size' => 128,
|
||||
'signed' => true,
|
||||
'required' => false,
|
||||
'default' => null,
|
||||
'array' => false,
|
||||
'filters' => [],
|
||||
],
|
||||
[
|
||||
'$id' => 'description',
|
||||
'type' => Database::VAR_STRING,
|
||||
|
|
|
@ -35,7 +35,6 @@ App::post('/v1/projects')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_PROJECT)
|
||||
->param('projectId', '', 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', null, new Text(128), 'Project name. Max length: 128 chars.')
|
||||
->param('teamId', '', new UID(), 'Team unique ID.')
|
||||
->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true)
|
||||
->param('logo', '', new Text(1024), 'Project logo.', true)
|
||||
|
@ -51,7 +50,7 @@ App::post('/v1/projects')
|
|||
->inject('dbForInternal')
|
||||
->inject('dbForExternal')
|
||||
->inject('consoleDB')
|
||||
->action(function ($projectId, $name, $teamId, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $dbForConsole, $dbForInternal, $dbForExternal, $consoleDB) {
|
||||
->action(function ($projectId, $teamId, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $dbForConsole, $dbForInternal, $dbForExternal, $consoleDB) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForConsole */
|
||||
/** @var Utopia\Database\Database $dbForInternal */
|
||||
|
@ -70,7 +69,6 @@ App::post('/v1/projects')
|
|||
'$read' => ['team:' . $teamId],
|
||||
'$write' => ['team:' . $teamId . '/owner', 'team:' . $teamId . '/developer'],
|
||||
'teamId' => $team->getId(),
|
||||
'name' => $name,
|
||||
'description' => $description,
|
||||
'logo' => $logo,
|
||||
'url' => $url,
|
||||
|
|
|
@ -543,7 +543,6 @@ App::setResource('console', function() {
|
|||
return new Document2([
|
||||
'$id' => 'console',
|
||||
'$collection' => 'projects',
|
||||
'name' => 'Appwrite',
|
||||
'description' => 'Appwrite core engine',
|
||||
'logo' => '',
|
||||
'teamId' => -1,
|
||||
|
|
|
@ -212,8 +212,8 @@
|
|||
data-analytics-label="Create Project">
|
||||
<p>Appwrite projects are containers for your resources and apps across different platforms.</p>
|
||||
|
||||
<label>Name</label>
|
||||
<input type="text" class="full-width margin-bottom-xl" name="name" required autocomplete="off" maxlength="128" />
|
||||
<label>ID</label>
|
||||
<input type="text" class="full-width margin-bottom-xl" name="projectId" required autocomplete="off" maxlength="128" />
|
||||
|
||||
<footer>
|
||||
<button type="submit">Create</button> <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
|
||||
|
|
|
@ -23,12 +23,6 @@ class Project extends Model
|
|||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Project name.',
|
||||
'default' => '',
|
||||
'example' => 'New Project',
|
||||
])
|
||||
->addRule('description', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Project description.',
|
||||
|
|
Loading…
Reference in a new issue