]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use autowiring when registering commands
authorLucas Azevedo <lhs_azevedo@hotmail.com>
Thu, 24 Aug 2023 14:26:27 +0000 (11:26 -0300)
committerGitHub <noreply@github.com>
Thu, 24 Aug 2023 14:26:27 +0000 (11:26 -0300)
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
core/register_command.php

index cfd1a6d2aeaf126bd56b826e6a5be0f2d90ab94e..f6ffe231c8ffe2f13edf7477f583e162a3c3d23e 100644 (file)
@@ -193,8 +193,8 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
        $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
        $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
        $application->add(new OC\Core\Command\User\AddAppPassword(\OC::$server->get(\OCP\IUserManager::class), \OC::$server->get(\OC\Authentication\Token\IProvider::class), \OC::$server->get(\OCP\Security\ISecureRandom::class), \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class)));
-       $application->add(new OC\Core\Command\User\AuthTokens(\OC::$server->get(\OCP\IUserManager::class), \OC::$server->get(\OC\Authentication\Token\IProvider::class)));
-       $application->add(new OC\Core\Command\User\DeleteAuthToken(\OC::$server->get(\OC\Authentication\Token\IProvider::class)));
+       $application->add(\OC::$server->get(\OC\Core\Command\User\AuthTokens::class));
+       $application->add(\OC::$server->get(\OC\Core\Command\User\DeleteAuthToken::class));
 
        $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
        $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));