adjust oauth app

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
pull/40766/head
Julien Veyssier 2023-10-04 13:20:57 +07:00
parent 32f984c520
commit d2bc483adf
No known key found for this signature in database
GPG Key ID: 4141FEE162030638
2 changed files with 5 additions and 3 deletions

@ -51,7 +51,7 @@ class CleanupExpiredAuthorizationCode extends TimedJob {
* @param mixed $argument * @param mixed $argument
* @inheritDoc * @inheritDoc
*/ */
protected function run($argument) { protected function run($argument): void {
try { try {
$this->accessTokenMapper->cleanupExpiredAuthorizationCode(); $this->accessTokenMapper->cleanupExpiredAuthorizationCode();
} catch (Exception $e) { } catch (Exception $e) {

@ -40,7 +40,7 @@ class Version011603Date20230620111039 extends SimpleMigrationStep {
) { ) {
} }
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure(); $schema = $schemaClosure();
@ -51,6 +51,7 @@ class Version011603Date20230620111039 extends SimpleMigrationStep {
$table->addColumn('code_created_at', Types::BIGINT, [ $table->addColumn('code_created_at', Types::BIGINT, [
'notnull' => true, 'notnull' => true,
'default' => 0, 'default' => 0,
'unsigned' => true,
]); ]);
$dbChanged = true; $dbChanged = true;
} }
@ -58,6 +59,7 @@ class Version011603Date20230620111039 extends SimpleMigrationStep {
$table->addColumn('token_count', Types::BIGINT, [ $table->addColumn('token_count', Types::BIGINT, [
'notnull' => true, 'notnull' => true,
'default' => 0, 'default' => 0,
'unsigned' => true,
]); ]);
$dbChanged = true; $dbChanged = true;
} }
@ -73,7 +75,7 @@ class Version011603Date20230620111039 extends SimpleMigrationStep {
return null; return null;
} }
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
// we consider that existing access_tokens have already produced at least one oauth token // we consider that existing access_tokens have already produced at least one oauth token
// which prevents cleaning them up // which prevents cleaning them up
$qbUpdate = $this->connection->getQueryBuilder(); $qbUpdate = $this->connection->getQueryBuilder();