Skip to content

Commit 4b05136

Browse files
committed
refactor(user_ldap): Remove Application::registerRoutes() usage
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 238f518 commit 4b05136

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

apps/user_ldap/appinfo/routes.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
declare(strict_types=1);
44

5-
use OCA\User_LDAP\AppInfo\Application;
6-
use OCP\AppFramework\App;
7-
85
/**
96
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
107
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -25,23 +22,17 @@
2522
$this->create('user_ldap_ajax_wizard', 'apps/user_ldap/ajax/wizard.php')
2623
->actionInclude('user_ldap/ajax/wizard.php');
2724

28-
$application = new App('user_ldap');
29-
$application->registerRoutes($this, [
25+
return [
3026
'ocs' => [
3127
['name' => 'ConfigAPI#create', 'url' => '/api/v1/config', 'verb' => 'POST'],
3228
['name' => 'ConfigAPI#show', 'url' => '/api/v1/config/{configID}', 'verb' => 'GET'],
3329
['name' => 'ConfigAPI#modify', 'url' => '/api/v1/config/{configID}', 'verb' => 'PUT'],
3430
['name' => 'ConfigAPI#delete', 'url' => '/api/v1/config/{configID}', 'verb' => 'DELETE'],
35-
]
36-
]);
37-
38-
/** @var Application $application */
39-
$application = \OC::$server->query(Application::class);
40-
$application->registerRoutes($this, [
31+
],
4132
'routes' => [
4233
['name' => 'renewPassword#tryRenewPassword', 'url' => '/renewpassword', 'verb' => 'POST'],
4334
['name' => 'renewPassword#showRenewPasswordForm', 'url' => '/renewpassword/{user}', 'verb' => 'GET'],
4435
['name' => 'renewPassword#cancel', 'url' => '/renewpassword/cancel', 'verb' => 'GET'],
4536
['name' => 'renewPassword#showLoginFormInvalidPassword', 'url' => '/renewpassword/invalidlogin/{user}', 'verb' => 'GET'],
46-
]
47-
]);
37+
],
38+
];

0 commit comments

Comments
 (0)