diff --git a/RestControllers/searchController.php b/RestControllers/searchController.php index 26c8dd8..fed1c96 100644 --- a/RestControllers/searchController.php +++ b/RestControllers/searchController.php @@ -10,10 +10,10 @@ class searchController /** * Peform a research on the database * - * @url POST /search/request + * @url POST /search/user * @url POST /user/search */ - public function searchDatabase(){ + public function search_user(){ user_login_required(); //Check if the query was specified with the request @@ -28,7 +28,7 @@ class searchController Rest_fatal_error(401, "Invalid search limit !"); //Perform research on the database and return results - $results = CS::get()->components->searchUser->search($_POST['query'], $searchLimit); + $results = CS::get()->components->search->search_user($_POST['query'], $searchLimit); if($results === false) Rest_fatal_error(500, "An error occured while trying to perform a research in user list !"); diff --git a/classes/components/searchUser.php b/classes/components/search.php similarity index 68% rename from classes/components/searchUser.php rename to classes/components/search.php index e5677db..de0921e 100644 --- a/classes/components/searchUser.php +++ b/classes/components/search.php @@ -1,20 +1,20 @@