mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(ldap): Fix wizard controller action route
It seems naming a route parameter $action causes issue, so renamed it to $wizardAction. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com> Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
777c729f68
commit
9d41d8172b
1 changed files with 8 additions and 5 deletions
|
|
@ -44,11 +44,14 @@ class WizardController extends OCSController {
|
|||
* 200: Wizard action result
|
||||
*/
|
||||
#[AuthorizedAdminSetting(settings: Admin::class)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/v1/wizard/{configID}/{action}')]
|
||||
public function action(string $configID, string $action, ?string $loginName, ?string $key, ?string $val) {
|
||||
#[ApiRoute(verb: 'POST', url: '/api/v1/wizard/{configID}/{wizardAction}')]
|
||||
public function action(
|
||||
string $configID, string $wizardAction,
|
||||
?string $loginName = null, ?string $key = null, ?string $val = null,
|
||||
) {
|
||||
try {
|
||||
$wizard = $this->wizardFactory->get($configID);
|
||||
switch ($action) {
|
||||
switch ($wizardAction) {
|
||||
case 'guessPortAndTLS':
|
||||
case 'guessBaseDN':
|
||||
case 'detectEmailAttribute':
|
||||
|
|
@ -66,7 +69,7 @@ class WizardController extends OCSController {
|
|||
case 'countGroups':
|
||||
case 'countInBaseDN':
|
||||
try {
|
||||
$result = $wizard->$action();
|
||||
$result = $wizard->$wizardAction();
|
||||
if ($result !== false) {
|
||||
return new DataResponse($result->getResultArray());
|
||||
}
|
||||
|
|
@ -80,7 +83,7 @@ class WizardController extends OCSController {
|
|||
if ($loginName === null || $loginName === '') {
|
||||
throw new OCSException('No login name passed');
|
||||
}
|
||||
$result = $wizard->$action($loginName);
|
||||
$result = $wizard->$wizardAction($loginName);
|
||||
if ($result !== false) {
|
||||
return new DataResponse($result->getResultArray());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue