Merge remote-tracking branch 'origin/feat-expire-key' into feat-expire-key
# Conflicts: # app/controllers/api/projects.php
This commit is contained in:
commit
0c435b9c3b
|
@ -885,7 +885,7 @@ App::put('/v1/projects/:projectId/keys/:keyId')
|
|||
->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), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Key scopes list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.')
|
||||
->param('expire', 0, new Integer() , 'Key expiration timestamp' ,true)
|
||||
->param('expire', null, new Integer() , 'Key expiration timestamp', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function (string $projectId, string $keyId, string $name, array $scopes, int $expire, Response $response, Database $dbForConsole) {
|
||||
|
|
|
@ -29,7 +29,7 @@ class Key extends Model
|
|||
])
|
||||
->addRule('expire', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Key expiration .',
|
||||
'description' => 'Key expiration timestamp.',
|
||||
'default' => 0,
|
||||
'example' => '1653990687',
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue