diff --git a/app/Http/Controllers/Api/SettingsController.php b/app/Http/Controllers/Api/SettingsController.php index 00bb8bf406..5c987584be 100644 --- a/app/Http/Controllers/Api/SettingsController.php +++ b/app/Http/Controllers/Api/SettingsController.php @@ -75,8 +75,9 @@ class SettingsController extends Controller // } - public function getLdapTest() + public function ldaptest() { + echo 'foo'; \Log::debug('Preparing to test LDAP connection'); try { diff --git a/resources/views/settings/ldap.blade.php b/resources/views/settings/ldap.blade.php index 84f046a3c5..d114fcfbe4 100644 --- a/resources/views/settings/ldap.blade.php +++ b/resources/views/settings/ldap.blade.php @@ -335,13 +335,11 @@
- -
@@ -389,20 +387,17 @@ dataType: 'json', success: function (data) { - // console.dir(data); - //console.log(data.responseJSON.message); $("#ldaptesticon").html(''); $("#ldaptestrow").addClass('success'); $("#ldapteststatus").html(' It worked!'); }, error: function (data) { - console.dir(data); - console.log(data.responseJSON.message); + //console.dir(data); $("#ldaptesticon").html(''); $("#ldaptestrow").addClass('danger'); $("#ldaptesticon").html(''); - $('#ldapteststatus').text(data.responseJSON.message); + $('#ldapteststatus').text(data.responseText.message); } diff --git a/routes/api.php b/routes/api.php index 6cdf782b4c..fa31edde47 100644 --- a/routes/api.php +++ b/routes/api.php @@ -419,7 +419,11 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () { /*--- Settings API ---*/ - + Route::get('settings/ldaptest', [ + 'as' => 'api.settings.ldaptest', + 'uses' => 'SettingsController@ldaptest' + ]); + Route::resource('settings', 'SettingsController', [ 'names' => @@ -434,10 +438,7 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () { ] ); // Settings resource - Route::get('settings/ldaptest', [ - 'as' => 'api.settings.ldaptest', - 'uses' => 'SettingsController@getLdapTest' - ]); + /*--- Status Labels API ---*/