Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4124657f authored by Ronak Patel's avatar Ronak Patel
Browse files

change in call

parent 05e6443f
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace OCA\EcloudAccounts\Command;

use OCA\EcloudAccounts\AppInfo\Application;
use OCA\EcloudAccounts\Service\BlackListService;
use OCA\EcloudAccounts\Service\UserService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
@@ -12,10 +13,12 @@ use Symfony\Component\Console\Output\OutputInterface;

class UpdateBlacklistedDomains extends Command {
	private UserService $userService;
	private BlackListService $blackListService;

	public function __construct(UserService $userService) {
	public function __construct(UserService $userService, BlackListService $blackListService) {
		parent::__construct();
		$this->userService = $userService;
		$this->blackListService = $blackListService;
	}

	protected function configure() {
@@ -24,7 +27,7 @@ class UpdateBlacklistedDomains extends Command {

	protected function execute(InputInterface $input, OutputInterface $output): int {
		try {
			$this->userService->updateBlacklistedDomains();
			$this->blackListService->updateBlacklistedDomains();
			$output->writeln('Updated blacklisted domains for creation.');
		} catch (\Throwable $th) {
			$output->writeln('Error while updating blacklisted domains.');